只拿到了一个分支一个 commit, 再运行 fetch 也拿不到其他的分支和 commits 了.
尝试了 git fetch --all
git fetch origin
无效.
用什么命令来获取完整的仓库呢?
更新:
搜到一段文章说不能继续... 不知道是不是真的:
http://strk.keybit.net/blog/2011/06/07/getting-just-the-tip-of-a-remote-git-branch/
A shallow repository (one with short history) cannot be further cloned,
Refer to the answers of @Leedy and @Evian and find that there is a
unshallow
parameter:(Did you solve the problem in the comments?)
It can be seen that git shallow clone can only clone the directory structure of the current remote/HEAD, excluding the history, so it is not a complete repo.
However, Git 1.9/2.0 has removed this limitation, see https://github.com/git/git/commit/82fba2b9d39163a0c9b7a3a2f35964cbc039e1a.
Reference: http://stackoverflow.com/questions/6941889/is-git-clone-depth-1-shallow-clone-more-useful-than-it-makes-out
git fetch --depth=1000000
I saw a solution on stackoverflow, but it still didn’t work after I tried it.
http://stackoverflow.com/questions/6802145/convert-shallow-clone-to-full-clone
git pull --unshallow