version control - Git: How to manage multiple branches on submodule and tie them to particular branches on main repo -
i working on large project main repository submodule rapidly changing. there 1 submodule has different branches. lets call them master, dev1 , dev2. main repository has various branches master, dev1, dev2, dev3, dev4 etc. know when checkout branch on main repository submodule checked out @ particular commit in detached head. having multiple branches in submodule force me remember checkout right branches on main repository submodule before making commits main repo or submodule. want when checkout particular branch on main repository, branch matching name should automatically checked out on submodule , if there no matching branch, 'master' branch on submodule should checked out. want same thing happen while switching branches on submodule appropriate branch on main repo has appropriate commit on relevant branch on submodule.
git 1.8.2 added option track submodule branch. not able figure out if useful anyways achieve want.
please let me know if seems possible other way. great know how folk manage scenario.
it sounds need move sub-module separate repository , use external in main repository, can tag specific versions, (and branches), of external in main , vice versa.
Comments
Post a Comment