Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write git commit messages for submodule updates?

I always struggle to write good git commit messages for commits which did nothing except update which commit a submodule is on. What I really want to write is "just read the freaking submodule commit messages!"

Perhaps a slightly nicer solution is, does there exist something which goes to the submodule and concatenates all of the messages since the previous commit it was on in some nice fashion and automatically makes that the message?

like image 223
marius Avatar asked Nov 01 '15 23:11

marius


People also ask

Can you commit to a git submodule?

The parent repository is only concerned with pinning the submodule to a commit. Now we can update the parent repository again by doing a git add and git commit on the submodule. This will put everything into a good state with the local content.

Will git pull update submodules?

Pulling with submodules. Once you have set up the submodules you can update the repository with fetch/pull like you would normally do. To pull everything including the submodules, use the --recurse-submodules and the --remote parameter in the git pull command .


1 Answers

Another possibility is to use submodule summary

git config --local status.submoduleSummary true

which will provide information on the commits of the submodules which you than can copy paste into your superprojects commit message.

Also see the answers to this questions for some additional scripts.

like image 195
BNT Avatar answered Oct 14 '22 21:10

BNT