git依赖地狱? - 子模块拉失败

Wil*_*ken 0 git

我在这做错了什么?

$ git submodule foreach git pull # fails
$ cd Submodules/MBProgressHUD/
$ git diff
$ git checkout master
$ git pull
$ cd ..
$ cd ..
$ git submodule foreach git pull # fails
$ cd Submodules/ShareKit/
$ ls
$ git pull master
$ git checkout master
$ git diff
$ git submodule foreach git pull # fails
$ git status
$ git fetch
$ git pull
$ git submodule foreach git pull # fails
Run Code Online (Sandbox Code Playgroud)

最后一个显示,但基本上他们都看起来像这样:

Entering 'Submodules/JSONKit'
You are not currently on a branch. Please specify which
branch you want to merge with. See git-pull(1) for details.

    git pull <remote> <branch>

Stopping at 'Submodules/JSONKit'; script returned non-zero status.
Run Code Online (Sandbox Code Playgroud)

Bar*_*end 5

使用git submodule initgit submodule update命令下载子模块,而不是使用git pull.有关详细信息,请参阅http://git-scm.com/book/en/Git-Tools-Submodules#Cloning-a-Project-with-Submodules.