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.

Full-Stack Web Development Certificate: Live & Hands-on, In NYC or Online, 0% Financing, 1-on-1 Mentoring, Free Retake, Job Prep. Named a Top Bootcamp by Forbes, Fortune, & Time Out. Noble Desktop. Learn More.

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:

How to Learn Git

Master Git with hands-on training. Git is a free, open-source version control system that allows developers to track the changes they make to code.

Yelp Facebook LinkedIn YouTube Twitter Instagram