Skip to main content
/1 min read

Clone a Remote Repository: git clone

Resolve a Merge Conflict

1

Identify Conflicts

git status shows files with conflicts after a failed merge.

2

Open the Files

Look for <<<<<< / ====== / >>>>>> markers — your changes vs theirs.

3

Edit & Stage

Pick the right code, remove markers, git add the file.

4

Complete the Merge

git commit finalizes the merge with the resolved content.

Build Programming Foundations at Noble Desktop

Noble Desktop's Full-Stack Web Development Certificate teaches Git alongside the modern web stack — a must for any developer.

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: