5
Before we create a local copy of the GitHub repository (a clone in Git terminology § 2.9.4), we need somewhere to put it on our local machine. In my case, all the Git repositories are stored in the directory (see § 3.3):
D:\2500 Git Projects
When we use Brackets-Git to clone the repository from GitHub, we must have an empty directory to put it into. In my case I use a local directory with the same name as the GitHub repository†1. Hence I create an empty directory called lab-brackets-git within the 2500 Git Projects folder:
D:\2500 Git Projects\lab-brackets-git
†1 | The directory can be any name at all, but I find it avoids confusion if I give it the same name as the GitHub repository. |
The next thing we need is the SSH link for this repository. In GitHub, navigate to the repository home page (Figure 5.11), click to open the dialogue box. If it doesn’t say , click the link at the top right of the box (where is in Figure 5.12).
Select the text that starts git@github.com... and copy it ( ), or click the paste to clipboard icon ().
Next start Brackets. Click
and navigate to where you want to create the local repository, in my case this is:D:\2500 Git Projects\lab-brackets-git
Now click the Brackets-Git icon () on the right hand sidebar, the icon will turn blue and the Git interface window will open in the bottom pane of the Brackets window (Figure 5.13):
Click the Figure 5.14). There is no need to enter a username or password, we are using an SSH key (see § 4.3).
button and in the resulting dialog box, paste in the information copied from the box in GitHub (Click Figure 5.15).
to start the cloning process (this takes a few seconds) after which, Brackets will display the contents of the repository (The clue to this being a repository rather than just some folder is the branch icon on the left hand sidebar (Figure 5.15, highlighted in orange). This shows we are in a Git repository on the master branch.