The behaviour of
git commit -a seems to be to include changes to submodules, if they have new commits inside them. This isn't what I normally want, and I sometimes find myself accidentally pushing a commit with submodule changes that I didn't intend to include.
Is there a way to set
git commit -a to ignore submodules? I had a look in
git help config and didn't see anything.
A (less good) alternative might be to get
git status to make it clearer at a glance whether
git commit -a would include a submodule. Currently it shows either
modified: submodule (modified content)
modified: submodule (new commits)
and those are annoyingly similar. It looks like the
submodule.<name>.ignore config option can do something like what I want. But ideally I'd still like to see changes to submodules, just not in the same place as all my other changes unless
git commit -a will add them.