I have read this post, but I got a failure when using “git fetch origin develop –depth=61”
$ git fetch origin develop --depth=61
remote: Counting objects: 8629, done
remote: Finding sources: 100% (8629/8629)
remote: Total 8629 (delta 1690), reused 6747 (delta 1690)
Receiving objects: 100% (8629/8629), 25.26 MiB | 27.78 MiB/s, done.
Resolving deltas: 100% (1690/1690), done.
error: Could not read dea7ede4ea546006caf22b09afe123896a5cf09c
fatal: Failed to traverse parents of commit 7ce83cfc05b3ef3d2ec690677c97d81cc4c69deb
error: remote did not send all necessary objects
I have checked this error, and find because I have only cloned one branch(git clone -b develop URL_REPOSITORY –depth=1), and there is a commit from another branch, which I have not cloned yet.
So it’s not just a simple “git fetch –depth=xx”, there are a lot other branches not cloned yet. What should I do to fetch the topN commits conveniently?
0