Git · Middle · Question 29 of 75
What does a shallow clone (git clone --depth 1) give you?
- 1A read-only clone that can't be pushed
- ✓Correct answer: Only the latest commit, which is fast for CI
- 3Every file but without any branches
Explanation
CI rarely needs full history. But commands that need history (blame, merge-base for diffs, git describe) may need git fetch --unshallow or a deeper fetch.