WEEK 7 · LESSON 2 · TOPIC 4 OF 10 · Repository Creation by Cloning

Repository Creation by Cloning

Lesson progress

0% Complete

SECTION 1 OF 1

In this topic · 1 sections
  1. Overview

Overview

A second way to begin is to copy an existing remote repository to your computer:

git clone <repository-url>

Cloning downloads the remote repository into a new local folder. The downloaded folder includes both the project files and its .git directory, so it is immediately a complete local Git repository.

Initialization and cloning therefore begin from opposite directions:

  • git init starts with a local folder and turns it into a repository.
  • git clone starts with a remote repository and creates a local copy.