git submodules: track corresponding branch in submodule? -
say you've got project broken out superproject , submodule. both of them have stable (master) branches , dev branches. there way set submodules superproject tracks submodule's dev branch dev branch , submodule's stable branch stable branch?
what i'm imagining in .gitmodules
:
[submodule "subproject"] path = subproject url = http://www.github.com/nfirvine/subproject branch = $current_branch_name
(i'm looking @ ansible project, stable-1.9
branch tracks devel
branch of submodules. seems asking trouble.)
you use git attributes specify .gitmodules
doesn't merged automatically, i'm wondering if there's smarter that.
each commit in superproject associated specific commit in submodule. submodules don't automatically update or follow branches: each time want synchronize, you'll need cd submodule directory, checkout branch of choice, run git pull
, , commit result superproject. it's have each branch in superproject pointing commit in turn points appropriate submodule commit; git won't you. , when merge branches, you'll need sort part out manually.
that's assuming don't write awesome scripts tame madness, of course.
Comments
Post a Comment