
git directory and any files and directories that were in the cloned repository (in this example, only the README.md document). In the example above: git clone Īs a result, the subdirectory will be created along with the hidden. Type git clone followed by the URL you copied, then press Enter.

In the console, navigate to the directory that you want to be the parent directory of the directory for the local repository. The comparable procedure on the command line requires acquiring the URL to the GitHub repository.Īfter clicking the Clone or download button, copy the URL by clicking on the clipboard icon. More on this in the next lesson…Ĭommand line comparison Remember that you can skip this section if you don’t care about the command line. The second column (“Current Branch”) will normally be set at “master” unless you have created another branch. Once you’ve selected a location, the desktop client will default to that location the next time you clone.Īfter you’ve finished the cloning process, in the left column of the client, you’ll see either changed files or the commit history, depending on which tab you’ve selected. Click on the name of the repo you want to clone and you’ll have an opportunity to select the directory where you want the local copy of the repo to live on your computer. Repos that are forks you’ve made of some other user’s repo will have a little “fork” symbol. Repos that you own or to which you have write access will show up with little book icons. You’ll be presented with a list of repositories at to which you have access. Click on the Add dropdown and select “Clone Repository…”.

The process described here will work for cloning one of your own repositories, a repository that you’ve forked to your account from elsewhere, or another repository that you don’t own, but to which you have been given write access.ĭrop down the Current Repository menu in the upper left of the window. You can also initiate the cloning process from your local computer from within the GitHub Desktop application.
#Git download desktopr software#
If you choose Open in Desktop, the repository will open in the GitHub Desktop software after it downloads. You can initiate cloning of a repository from the website by clicking on the Clone or download button in the upper right of the repo page on the GitHub website. Cloning a GitHub Repository to Your Local Computer You can only have one copy checked out at a time. When you check out one branch, you obtain a copy of it and you stop using another copy. Since your local copy of the repository contains every branch in the repository, how do you determine which branch you will actually be working with on your hard drive? In Git, the process of switching branches is called “checking out” a branch. That includes all of the branches in the repository and all of the commit histories of every branch. The cloning process involves creating a complete copy of a repository on your local computer. GitHub desktop is available for every major operating system at.

Previous page: Introduction to GitHub The GitHub desktop clientĪlthough every Git operation can be carried out using the command line, many users prefer to use GitHub Desktop, a graphical interface for interacting with GitHub.
