Find the First Version/Tag That Contains a Specific Commit
The command shown below can be used to find the first version/tag that contains a specific commit.
In the example we run the command in a local clone of the Linux kernel repo to determine the first version of the Linux kernel which contains a bug fixed by the specific commit:
git describe --contains f3a1ef9cee4812e2d08c855eb373f0d83433e34c
And the output is:
v3.6-rc2~24^2~15
Source:
— Martin Burnicki martin.burnicki@burnicki.net, last updated 2021-07-29