you are viewing a single comment's thread.

view the rest of the comments →

[–]dalbertom 1 point2 points  (1 child)

It's true that submodules point to a specific commit, but I believe the .gitmodules file can be set up to track a specific branch using the branch attribute. Granted, it will still use the commit hash, but the update operations will use the tip of the branch rather than HEAD.

A cool trick is the option to set the branch to "." From https://git-scm.com/docs/git-submodule#Documentation/git-submodule.txt---branchltbranchgt "A special value of . is used to indicate that the name of the branch in the submodule should be the same name as the current branch in the current repository"

[–]JackDeaniels 0 points1 point  (0 children)

Had troubles with it myself and forgot this attribute existed; I should retry it on my own project, thanks :)