Interview Prep/Git & GitHub/Commits, branches and tags

What is a sparse checkout and how does it differ from a partial clone?

AdvancedConceptCommits, branches and tags
Answer

A partial clone (--filter=blob:none) limits which objects are downloaded; the rest are fetched lazily from the remote. Sparse checkout limits which paths are materialised in the working tree. They are used together for monorepos, and cone mode is the fast, directory-based pattern set.

git clone --filter=blob:none --sparse https://github.com/org/mono.git
cd mono && git sparse-checkout set services/payments libs/common
All Git & GitHub questions Roadmap: Git & GitHub

More on Commits, branches and tags