Reputation: 302
When making a release with git, using the git-flow model, I switch my repository to point to the latest commit in master, tag and then build from the tag. Is it good practice to merge changes into master for all the repository's submodules, and have them point to master (that is, the latest commit in master), or is it sufficient to leave all submodule commits unchanged?
Upvotes: 6
Views: 2561
Reputation: 1864
Your commit on master
will record the commits of all the submodules that you use.
If somebody checks out the release that you just cut (and tagged), they will be responsible to run git submodule update
in order to check out the correct commit on each submodule.
Submodule checkouts are always headless commits, i.e. addressed by their SHA-1 hash value and not by a symbolic ref (branch name). Therefore, it does not matter what branch they point to.
All that matters is what commits are recorded on master
(of the superproject).
So, to answer your question: it's OK to leave the submodule commits unchanged when you make your release.
Upvotes: 3