Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 464 Bytes

git-clone.md

File metadata and controls

31 lines (21 loc) · 464 Bytes

git clone

git clone <repo> [dest]

Checkout a given, non-default branch name:

git clone --branch=<name>

Omit branches, i.e. only fetch commits/history/objects in the checkout branch:

git clone --single-branch

Omit tags:

git clone --no-tags

Truncate history with --depth=<n> to replace old commits with one, big grafted parent commit that shows the state at HEAD~<n>:

git clone --depth=<n>