Cloning a Repo from Github
Last updated
Last updated
Goal: By the end of this document, you’ll be able to clone a repo from onto your local machine.
If you find a repo you want to use (or have created your own on in your own repo and want to start using it), the next step is to CLONE that repo to your local machine. Cloning, just like in biology, is creating an exact copy of the repo in another location. In this case we are going to clone the repo you created for your exercises in the onto your local machine.
Log into your account.
Go to the home page for the repo you created. You should see the content of the README.md file if you checked the box during the creation process. You should see something like this:
Open SourceTree.
In SourceTree, click on the + sign at the top of the screen then choose Clone from the icon bar
Back on Github, click on the green <> Code
button.
Copy the entire URL under the HTTPS tab. If you click on the 2 squares icon, it will copy the URL to your clipboard.
Back in Sourcetree, paste that URL into the top textbox in the Clone screen.
Browse to you the folder where you want to clone your site. If you followed the suggestion in setup this will be Sites\UML\WebDataImplementation
and create a new folder called ongoingWork
. Note: the image is for a demo, the domains and folders may be different from yours.
Click on Clone and the repo will be copied to your local machine.
Open the ongoingWork folder in File Explorer or Finder and you’ll see the file and the .git folder (which might be hidden)