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

GitGithub

Git Problem Overview


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?

Git Solutions


Solution 1 - Git

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

git tag --contains <commit>

Solution 2 - Git

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBenMorelView Question on Stackoverflow
Solution 1 - GitBenMorelView Answer on Stackoverflow
Solution 2 - GitCristianView Answer on Stackoverflow