Step 1 / 6 · Clone

Clone: bring the garden home

Clone copies the project and its entire history to your computer.

Illustration: a blue ribbon carries the garden photo from the greenhouse to the gardener's laptop
In the garden

You go to the greenhouse and bring home a copy of the whole garden, with every photo taken so far. The greenhouse stays there, untouched.

In practice

The git clone command downloads the remote repository: the current files and the full commit history. A folder ready for editing appears on your computer, called the working tree.

You do not touch the greenhouse. You work on your copy, at your own pace, and decide later what to share.

Commands

git clone <url-do-repo> garden  # copy the project and its history
cd garden  # go into the working folder

Tip: You clone once per project. After that, use git pull to get updates from the team.

What the history looks like

Afirst gardenmain