Skip to content

Latest commit

 

History

History
99 lines (56 loc) · 5.22 KB

tutorial-clone-a-github-repo-with-github-desktop.md

File metadata and controls

99 lines (56 loc) · 5.22 KB

Clone a GitHub Repository with GitHub Desktop

Overview

In this tutorial, you’ll learn how to clone a repository from your GitHub.com account to your local macOS computer with GitHub Desktop.

This tutorial is intended for beginner users of GitHub Desktop.

Background

The following are a few concepts to review for this tutorial:

  • Git: An open-source version control system (VCS) software that serves as a time machine because it records changes to your files and allows you to revert or recall changes you made.
  • GitHub: A web-based platform built on Git that can host and manage files and allows you to collaborate with other users on projects.
  • Repositories: Folders that store files and their revision history within GitHub.
  • GitHub Desktop: An application installed on your local computer that allows you to interact with your GitHub.com account without using the command line and web browser because it provides a simple and intuitive user interface.
  • Cloned Repositories: A local copy of a repository on your computer that is created from and syncs to your GitHub.com account, allowing you to edit and create new files remotely.

Before you begin

Before you begin this tutorial, you must have:

  • A GitHub account

    Note: If you do not have a GitHub account, you must create one. You can follow GitHub's Signing up for a new GitHub account instructions.

  • A repository in your GitHub account

    Note: If you need to learn how to create a repository in GitHub, follow GitHub's Create a repo instructions.

  • Git installed on your local computer with a macOS operating system

    Note: If you do not have Git installed on your computer, follow GitHub’s Install Git instructions.

Step 1 — Download and install GitHub Desktop

To get started, you must first download and install the GitHub Desktop application on your local computer.

  1. Go to the GitHub Desktop website at https://desktop.github.com/.

    A photo of the GitHub Desktop download page.

  2. In the GitHub Desktop window, click Download for macOS.

  3. In the Finder browser, go to the Downloads folder.

  4. To unzip the file, double-click the GitHubDesktop-x64.zip file.

  5. After the file unzips, drag and drop the GitHub Desktop application file into your Applications folder.

  6. In the Applications folder, double-click GitHub Desktop.

  7. To confirm launching GitHub Dekstop, click Open when prompted.

Results: GitHub Desktop launches, showing the Let’s get started! landing page.

Step 2 — Sign in to GitHub

After downloading, installing, and launching GitHub Desktop, you must sign into your GitHub.com account.

  1. On the Let’s get started! landing page, select Clone a Repository from the Internet.

Step Result: The Clone a Repository dialog opens.

  1. In the GitHub.com tab, click Sign In.

Step Result: The Sign in Using Your Browser confirmation message opens.

  1. Click Continue With Browser.

Step Result: The Sign in to GitHub window opens in your default browser.

  1. Enter your GitHub username or email address and password, and then click Sign in.

Results: You are signed in to your GitHub.com account.

Step 3 — Clone the repository

Now that you are signed into your GitHub.com account, you can clone a repository to your local computer.

  1. Go back to the GitHub Desktop application.

  2. From the Your Repositories drop-down list, select the repository that you want to clone to your local computer.

  3. Click Clone [Repository's Name]. A photo of the Your Repositories dropdown list and Clone button.

Step Result: The Clone a Repository dialog opens with the URL tab selected as the default cloning method.

NOTE: Since GitHub Desktop is connected to your GitHub.com account, the Repository URL or GitHub username and repository field is automatically filled in.

A photo of the Clone a Repository dialog box.

  1. Perform the following actions:
  • In the Local Path field, click Choose.

  • In the Finder browser, select the location of where you want your repository to be cloned to on your local computer

    Step Result: You are directed back to the URL tab in the Clone a Repository dialog box.

  • Click Clone. A photo of the Clone button in the Clone a Repository dialog box.

Results: The repository is cloned to your local computer from your GitHub.com account and opens in GitHub Desktop. You can now change files locally and push them to your GitHub.com repository.