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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The command
git submodule modulenamegives you the commit without going into the submodule directory, followed by the result ofgit describe, which gives you most recent tag:For branch you have to
cdin the directory, or change$GITDIRbefore runninggit status.