- Go to the folder where the project should live
cd ~/Documents - Clone the repository
git clone https://github.com/user/project.gitCopy the address from the green Code button on GitHub. If you set up an SSH key, use the SSH address instead of the https one.
- Private repository? Clone with a token instead
git clone https://ghp_yourtoken@github.com/user/project.gitUse this in place of the step above. Make a personal access token on GitHub under Settings, then Developer settings, and give it access to this repository.
- Then take the token out of the saved address
git -C project remote set-url origin https://github.com/user/project.gitOtherwise the token sits in the project's settings in plain text. When Git asks for a password later, paste the token.
- Step into the new folder
cd projectGit names the folder after the project. To pick your own name, add it at the end of the clone command.
Check it worked
- Check where it came from
git remote -vYou should see the address you cloned from, labelled origin.
- See the latest history
git log --oneline -5
Undo it
- Delete the copy
cd .. && rm -rf projectThis only removes your copy on this computer. The project online is not touched.
- Go to the folder where the project should live
cd ~ - Clone the repository
git clone https://github.com/user/project.gitCopy the address from the green Code button on GitHub. If you set up an SSH key, use the SSH address instead of the https one.
- Private repository? Clone with a token instead
git clone https://ghp_yourtoken@github.com/user/project.gitUse this in place of the step above. Make a personal access token on GitHub under Settings, then Developer settings, and give it access to this repository.
- Then take the token out of the saved address
git -C project remote set-url origin https://github.com/user/project.gitOtherwise the token sits in the project's settings in plain text. When Git asks for a password later, paste the token.
- Step into the new folder
cd projectGit names the folder after the project. To pick your own name, add it at the end of the clone command.
Check it worked
- Check where it came from
git remote -vYou should see the address you cloned from, labelled origin.
- See the latest history
git log --oneline -5
Undo it
- Delete the copy
cd .. && rm -rf projectThis only removes your copy on this computer. The project online is not touched.
- Go to the folder where the project should live
cd $HOME\Documents - Clone the repository
git clone https://github.com/user/project.gitCopy the address from the green Code button on GitHub. If you set up an SSH key, use the SSH address instead of the https one.
- Private repository? Clone with a token instead
git clone https://ghp_yourtoken@github.com/user/project.gitUse this in place of the step above. Make a personal access token on GitHub under Settings, then Developer settings, and give it access to this repository.
- Then take the token out of the saved address
git -C project remote set-url origin https://github.com/user/project.gitOtherwise the token sits in the project's settings in plain text. When Git asks for a password later, paste the token.
- Step into the new folder
cd projectGit names the folder after the project. To pick your own name, add it at the end of the clone command.
Check it worked
- Check where it came from
git remote -vYou should see the address you cloned from, labelled origin.
- See the latest history
git log --oneline -5
Undo it
- Delete the copy
cd ..; Remove-Item -Recurse -Force projectThis only removes your copy on this computer. The project online is not touched.

New to Clone? I explain it in plain English on Layman Terms.