Reputation: 56706
I have a project in git. It has a couple of submodules. Without going into the submodule and doing a git status or similar, is there a way to tell which commit, branch, and tag it the main project thinks it should be on?
Upvotes: 1
Views: 66
Reputation: 90316
The command git submodule modulename
gives you the commit without going into the submodule directory, followed by the result of git describe
, which gives you most recent tag:
$ git submodule ext/fiji
808e757481874dfd493b8cc08a484235ce807ec2 ext/fiji (Fiji-Madison-23-g808e757)
For branch you have to cd
in the directory, or change $GITDIR
before running git status
.
Upvotes: 1