What is the difference between a "Shallow Clone" and a "Partial Clone"?

Last updated 6 July 2026

  • A shallow clone (--depth 1) truncates history: all files but only the latest commits, which is ideal for CI but limits log/blame.

  • A partial clone (--filter=blob:none) keeps full commit history but omits file contents, fetching them on demand from the remote.

  • Partial clone preserves full-history operations like log better than shallow.

  • https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/
  • https://www.runxbuild.com/blog/git-shallow-clone/
  • https://git-scm.com/docs/partial-clone/2.21.0
  • https://git-scm.com/docs/git-clone/2.32.0
  • https://github.blog/open-source/git/highlights-from-git-2-43/
  • https://github.blog/open-source/git/highlights-from-git-2-48/
  • https://git-scm.com/docs/gitrepository-layout/2.24.0
  • https://github.blog/jp/2021-01-13-get-up-to-speed-with-partial-clone-and-shallow-clone/
All Git interview questions