How to write git commit messages for submodule updates?
Asked Answered
B

2

14

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?

Bulganin answered 1/11, 2015 at 23:10 Comment(0)
D
6

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.

Dissimulate answered 8/8, 2018 at 7:48 Comment(0)
G
4

I don't know why this is weighing on you but I think there are probably only two basic reason you are going to update your submodules:

  1. You found a bug in the submodule and it was already fixed upstream. I this case just write:

    Update submodule XXX to vY.Z to add feature KKKK

    You probably also want to add additional detailed description about how this feature is impacting your repo, etc.

  2. You simply want to sync your submodules to the latest revs and don't really care what was fixed or changed:

    Update submodule XXX to latest

Gaud answered 30/6, 2017 at 0:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.