When you create a repository, it is hosted directly on GitHub as a remote repository. You can clone it to get a local copy on your computer so you can make changes. The following guide will show you how to clone a repository to the server or computer you will be using to work on it.
How to clone a repository
- Point your browser to the main page of the GitHub Repository you want to clone.
- Select the Clone or Download Button
- If the drop down menu shows Clone with SSH, then select the Use HTTPS option
- Check to ensure the drop down menu shows Clone with HTTPS before proceeding
- Select the clipboard icon to copy the URL
- You will see the following message once you have copied the URL to your clipboard
- Open your SSH Terminal and login to your server
- Change to the directory in which you want to store the project
- Type git clone and then paste the URL you copied in step 3
- Press Enter and your local clone will be created
- You can run
ls -lahto ensure the files were downloaded correctly
Congratulations! You now know how to clone a repository to your local server.
Get more for free by signing up with BoldGrid Central Create Account