Interview Prep/Git & GitHub/Conflicts, remotes, fetch, pull and push

What are shallow clones and when are they dangerous?

IntermediateConceptConflicts, remotes, fetch, pull and push
Answer

--depth N downloads only the last N commits. It saves time in CI, but git describe, merge-base, changelog generation and blame can break because history is truncated. Deepen with git fetch --unshallow or --deepen, and for CI use fetch-depth: 0 where full history matters.

git clone --depth 1 --branch v1.4.0 https://github.com/org/repo.git
git fetch --unshallow
All Git & GitHub questions Roadmap: Git & GitHub

More on Conflicts, remotes, fetch, pull and push