Gitk has a nice habit of showing me Tags:, Follows: and Precedes: for commit. How do I get the same information from command line?
To show the tags that contain a commit (i.e. the tags that the commit precedes):
git tag --contains <commit>
To show the tag of a commit:
$ git describe --tags <commit>
To show the preceding commit:
$ git rev-list -1 <commit>^
To show the following commit:
$ git rev-list -1 <commit>..HEAD
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With