git clone

Copy a repository

low risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

Creates a local copy of a repo. See the flags and examples below, and run `man git` for the full reference.

Common flags
FlagMeaning
--depth --depthShallow clone
--branch --branchClone a branch
--recurse-submodules --recurse-submodulesInclude submodules
Examples
git clone --depth 1 https://github.com/org/repo.gitShallow clone · explain & risk-check →
Related
git fetch
Open the full explainer →More in Git

Reference text is hand-written and may be incomplete — check man git for your version. Test destructive commands on a non-production system first.