开发者

How can I do git checkout on a repository with submodules?

Suppose I have a repository X with a sub module A. Now suppose I want X to have two branches: master and development. I want master to have a different revision of A than development does. How can I switch back and forth between these branches?

I've got a repository set up that does this (but using real names instead of fake ones!). The problem is that whenever I do git checkout master from development, I get the following:开发者_高级运维

$ git co master
M       A
Switched to branch 'master'

It looks like it's not putting A back to the commit that master references. Is there any way around this? Both git submodule sync and git submodule update don't seem to change anything.


You need made a git checkout before

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜