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.
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 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.
To get started, you must first download and install the GitHub Desktop application on your local computer.
-
Go to the GitHub Desktop website at https://desktop.github.com/.
-
In the GitHub Desktop window, click Download for macOS.
-
In the Finder browser, go to the Downloads folder.
-
To unzip the file, double-click the GitHubDesktop-x64.zip file.
-
After the file unzips, drag and drop the GitHub Desktop application file into your Applications folder.
-
In the Applications folder, double-click GitHub Desktop.
-
To confirm launching GitHub Dekstop, click Open when prompted.
Results: GitHub Desktop launches, showing the Let’s get started! landing page.
After downloading, installing, and launching GitHub Desktop, you must sign into your GitHub.com account.
- On the Let’s get started! landing page, select Clone a Repository from the Internet.
Step Result: The Clone a Repository dialog opens.
- In the GitHub.com tab, click Sign In.
Step Result: The Sign in Using Your Browser confirmation message opens.
- Click Continue With Browser.
Step Result: The Sign in to GitHub window opens in your default browser.
- Enter your GitHub username or email address and password, and then click Sign in.
Results: You are signed in to your GitHub.com account.
Now that you are signed into your GitHub.com account, you can clone a repository to your local computer.
-
Go back to the GitHub Desktop application.
-
From the Your Repositories drop-down list, select the repository that you want to clone to your local computer.
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.
- 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.
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.