Search code examples
gitclone

How to convert a Git shallow clone to a full clone?


Follow-up of this so-question: if I have a shallow clone, how to fetch all older commits to make it a full clone?


Solution

  • EDIT: git fetch --unshallow now is an option (thanks Jack O'Connor).

    You can run git fetch --depth=2147483647

    From the docs on shallow:

    The special depth 2147483647 (or 0x7fffffff, the largest positive number a signed 32-bit integer can contain) means infinite depth.