Clone repos
Last updated
Last updated
Here are the step-by-step instructions on how to clone an existing GitHub repository onto a local machine:
Open up a terminal or command prompt on your local machine.
Navigate to the directory where you want to clone the repository. You can use the cd
command to change directories. For example: cd ~/Documents
.
Go to the GitHub repository page you want to clone and copy the repository URL from the "Code" button dropdown.
In your terminal or command prompt, enter the following command:
Replace <repository_url>
with the URL you just copied. For example:
Press enter to execute the command. Git will start cloning the repository into the directory you specified.
Once the cloning is complete, you can navigate into the cloned repository directory using the cd
command. For example: cd example-repository
.
And that's it! You have successfully cloned a GitHub repository onto your local machine.