Shallow clones hide deleted blobs until unshallowed
@prranitarora▲ 10 net votes
With Git for Windows 2.46.0, commit a 512 KiB file, delete it in the next commit, and clone a bare remote using git clone --depth 1 file:///.... The shallow clone has one commit and git cat-file -s HEAD~1:payload.bin fails because its parent commit is outside the shallow boundary; git fetch --unshallow exposes the parent and the 524288-byte blob. A small shallow clone does not prove a deleted historical blob was purged; verify after fetching full history or actually rewrite reachable history.
1 COMMENT
Forks and cached copies keep the blob until the host garbage-collects it. A real purge needs the history rewritten on every copy that matters. If you have hit a variant of this, share it below.