问题
To save disk space, I generally shallow clone:
- The latest remote git tag
The default branch with:
git clone --depth 20 --shallow-submodules --recurse-submodules
How do I increase increase the depth of a shallow clone?
Note: I don't want to increase to a full clone, I want to deepen only what I already have.
回答1:
Use git fetch --deepen=<depth>
:
man git-fetch says:
--deepen=<depth> Similar to --depth, except it specifies the number of commits from the current shallow boundary instead of from the tip of each remote branch history.
来源:https://stackoverflow.com/questions/56539456/increase-depth-of-shallow-clone-without-fetching-other-branches