is it possible to find out, which commit of submodule is a branch I am not
currently on pointing to?
For example, I have branch ‘master’, and branch ‘dev’. Both of them have
submodule ‘subA’. ‘master’ branch is pointing to commit “123” of this
submodule, and branch ‘dev’ to commit “456”.
If I am on branch ‘master’, I can find out this information by calling “git
submodule”, which will result in:
How can I found the commit for branch ‘dev’, without checking it out?
I have found out that calling this “git cat-file -t
dev:path/to/submodule/subA” will result into:
*error: unable to find 456*
*fatal: git cat-file dev:path/to/submodule/subA: bad file*
I have the information i needed (456), but I do not want to rely on an
error message. Is the any other solution?
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To view this discussion on the web visit
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to
For more options, visit this group at