Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 1.68 KB

02-clone-a-git-repo.md

File metadata and controls

26 lines (16 loc) · 1.68 KB

Cloning a Repository from Github

Github is the "Google Docs of Code" - it allows developers to store their code in the cloud and share it with people around the world. In this lesson, we're going to learn how to download a repository (or "Repo") from Github using git in the command line. Git is a version control system that allows us to save our work at different times.

What are Repositories?

A Repository is just a directory with a collection of files and folders that are "tracked" by github. You can think of a repository as a code project.

From the Cloud to your Computer (Cloning)

  1. Navigate to the github repo you want to clone. Here is an example repo for you to practice with
  2. Click the "Fork Button" on the top right and choose your profile to make a copy to. A fork is an identical copy of a repository, but that belongs to you.

Fork Button

  1. Click the green "Clone or Download" link on the right side and copy the address.

Clone Button

  1. In your terminal, navigate to your development directory (so you have all of your work in the same place)
  2. Enter git clone link_name where link_name is the link that you copied and run. This will download the github repo to your local machine.

git clone

  1. cd into the directory that you just downloaded.

More Resources