0

我在这里做错了什么?

$ 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

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

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.
4

1 回答 1

5

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

于 2013-02-17T23:08:43.310 回答