I did find an old question that answers this to some extent, but it's not entirely helpful as it stands:
how can I find out if a git submodule has new commits
Mostly I was hoping that git has changed since 2012 enough that this is easier.
When I do a git status
with my current setup I get two types of output. The usual lines
modified: path/to/submodule (new commits)
And some extra info about the submodules like this
* path/to/submodule/
< upstream repo
< added more commits
< you should update this submodule
* path/to/submodule/
> These commits
> don't exist upstream
> you should commit this submodule
Git seems to know exactly what is going on, but I don't seem to have the tool to determine this myself.
My goal is to know for each submodule whether I should commit it, update it, or manually investigate because there's a mix of >
and <
in there. I'm about to write a script based on heuristics, which feels bad, so better ideas are gratefully received.
$ git --version
git version 1.8.5.3