BeginnerPhone
1 min
Git Shallow Clone
GitVersion ControlBuild Systems
Advertisement
Interview Question
What does a shallow clone do in Git and when is it useful?
Key Points to Cover
- `git clone --depth N` fetches limited history
- Saves time/bandwidth in CI or large repos
- Trade-off: limited history for bisect/annotate
Evaluation Rubric
Defines shallow clone correctly40% weight
Explains speed/bandwidth benefits30% weight
Mentions history limitations30% weight
Hints
- 💡`--filter=blob:none` can further reduce size.
Potential Follow-up Questions
- ❓How to unshallow later?
- ❓Impacts on submodules?
Advertisement