Details
-
Suggestion
-
Resolution: Unresolved
-
None
Description
Git 1.8.2 (I think) added the the ability to track specific branches in submodules, but Sourcetree only seems to partly support it.
Specifically, when you do "Add Submodule..." I see that the command is called with the "-b" option and the branch specified (if you use the advanced settings). However, when you "Pull" from the parent repository it always executes "git submodule update --recursive --init". This will always put the submodule back to the commit stored with the parent repository. If the "--remote" argument is also supplied, it will first pull the given branch to the submodule.
At some level this is as simple as adding "--remote" to the submodule update command, although I'm sure everyone would like the ability to set this on a per-submodule basis (so some submodules can be semi-static, referring to a specific commit unless specifically changed).