Yelp Facebook LinkedIn YouTube Twitter Instagram

Classes available in-person (strict social distancing) or live online with an extended free retake period. See details.

Git

Clone a Remote Repository: git clone

Git Tips & Commands

When you want to start contributing to a Git repo that has already been created, you can clone it (download a copy) from GitHub, BitBucket, etc.

Clone a Git Repo

1. First you'll need the URL of the Git repo. Someone might send that to you, or if you're viewing a project on GitHub or Bitbucket you can find the URL as follows:

  • On GitHub: Click the Clone or download button to see the URL.
  • On Bitbucket: Click the Clone button. If it's set to SSH , switch to HTTPS . They give you the entire clone command including the URL.

2. In the command line (Terminal, Git Bash, or Windows Command Prompt) navigate to the folder where you want to put the repo that you'll be downloading.

A new folder for the repo will be created here, so you do not have to create a folder.

3. Run the following command:

git clone https://website.com/repo-name.git

A copy of the repo will be downloaded and you'll end up with a new folder (containing all the files in the repo) on your computer.

Grow Your Skills

Git is an essential tool for collaborating with other programmers. Learn Git and more through our coding classes & bootcamps: