Shallow Clone
ELI5 - The Vibe Check
A shallow clone grabs only the most recent slice of commit history instead of the entire multi-year saga, the same way you'd binge the last three episodes of a show instead of starting from season one. It's fast and light, perfect for a CI runner that just needs to build the current code, but it's a trap the moment you need older history, like when git bisect or git blame comes up empty because the commits you want were never downloaded.
Real Talk
A shallow clone, via git clone --depth N, truncates the fetched commit history to the most recent N commits, omitting older commits and their objects entirely rather than just deferring them. It significantly speeds up CI checkouts on large repositories, but operations that require full history, such as git bisect, git log --follow, or merging with unrelated older branches, fail or behave unexpectedly until the clone is unshallowed with git fetch --unshallow.
When You'll Hear This
"CI uses a shallow clone with depth 1, don't try to bisect from that checkout." / "We had to unshallow the clone before the blame command found anything useful."
Related Terms
CI (Continuous Integration)
CI is like a robot assistant that instantly checks your homework every time you hand it in.
Git Bisect
Git bisect is a binary search for bugs.
Packfile
A packfile is git's way of not storing your entire history as a million tiny loose files.
Partial Clone
A partial clone tells git to grab the commit history and file names, but not bother downloading the actual file contents until they're actually needed.