原文链接
Suppose B is the only submodule of A.
cd A
git ls-tree -r HEAD | grep commit
The output is something like
160000 commit 0814c6ba8f45829f04709c56118868d2483444c2 foofoo is the submodule folder and 0814c6ba8f45829f04709c56118868d2483444c2 is its revision tracked by A's current commit.git submodule update does something likecd B
git checkout 0814c6ba8f45829f04709c56118868d2483444c2
git submodule update --remote is likecd B
git fetch origin master
git checkout origin/master
By default
master and origin/master are used. If the branch is specified by submodule.foo.branch = bar in .gitmodule, thenbar and origin/bar are used.
评论
发表评论