Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out which release(s) contain a given GIT commit?

Tags:

git

github

Someone fixed a bug in HHVM in this commit:

https://github.com/facebook/hhvm/commit/796f986aba300b3f00b9ece0bf654c452ee217be

I want to know if this commit is already part of the official releases.

Is there a way to list the releases/tags that contain this commit, either on GitHub, or in a local clone of the GIT repository on my machine?

like image 827
BenMorel Avatar asked Jan 11 '15 11:01

BenMorel


People also ask

How do you check details of a commit in git?

`git log` command is used to view the commit history and display the necessary information of the git repository. This command displays the latest git commits information in chronological order, and the last commit will be displayed first.

How can I see the diff of a commit?

To see the diff for a particular COMMIT hash, where COMMIT is the hash of the commit: git diff COMMIT~ COMMIT will show you the difference between that COMMIT 's ancestor and the COMMIT .


2 Answers

As pointed out by fellow members in the comments, this is already covered here, and is as easy as:

git tag --contains <commit> 
like image 159
BenMorel Avatar answered Nov 07 '22 08:11

BenMorel


GitHub now shows you the tags containing a commit automatically when you open a commit (click on the ... to show all tags):

enter image description here

like image 31
Cristian Avatar answered Nov 07 '22 07:11

Cristian