Checkout in git superproject and submodules -



Checkout in git superproject and submodules -

consider superproject submodule. if superproject checked out previous commit, how automatically check out submodule corresponding commit ?

superproject : - b

submodule : x - y - z

superproject head on b, corresponding index on submodule on z. imagine in a, submodule index in x. how can automatically checkout submodule on x when check out superproject in ?

i can manually this question not efficient superproject many submodules.

[edit] by checkout, mean using git checkout commitsha1. according doc,

prepare work on top of , detaching head @ (see "detached head" section), , updating index , files in working tree.

i want recompile code in superproject commit (possibly tagged) without knowing explicitly corresponding submodules indexes.

i believe command you're looking is:

git submodule update

that should submodules right version (when run after git checkout)

http://git-scm.com/docs/git-submodule

git

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -