<p>For Example, i wanted to know which k8 version has the fix for  <a href="https://github.com/kubernetes/kubernetes/pull/23265/commits" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/pull/23265/commits</a> </p>

<p>From the commit history it shows that the change has been merged to 'master'</p>

<h1><code>git describe</code></h1>

<p><a href="https://git-scm.com/docs/git-describe" rel="nofollow noreferrer"><code>git describe</code></a> is intended for questions like yours.</p>

<ul>
<li>which tag is closest to the commit? (<code>git describe &lt;sha&gt;</code>)</li>
<li>which tag contains commit? (<code>git describe &lt;sha&gt; --contains</code>)</li>
<li>which branch or annotated tag is closest to the commit? (<code>git describe &lt;sha&gt;--all</code>)</li>
</ul>

<h1>So, which k8 version has the fix for <a href="https://github.com/kubernetes/kubernetes/pull/23265/commits" rel="nofollow noreferrer">PR 23265</a> ?</h1>

<p>Try these steps:</p>

<ol>
<li>Copy to the clipboard SHA1 of the only commit of <a href="https://github.com/kubernetes/kubernetes/pull/23265/commits" rel="nofollow noreferrer">PR 23265</a>: <a href="https://github.com/kubernetes/kubernetes/pull/23265/commits/2d064083001a7a7f7dfc8a5f8f2fc50582449bf6" rel="nofollow noreferrer">2d064083001a7a7f7dfc8a5f8f2fc50582449bf6</a></li>
<li>Clone <code>k8s</code> source: <code>git clone https://github.com/kubernetes/kubernetes/</code></li>
<li><code>cd kubernetes</code></li>
<li>Get the earliest annotated tag that contains commit:</li>
</ol>

<pre><code>git describe 2d064083001a7a7f7dfc8a5f8f2fc50582449bf6 --contains
v1.4.0-alpha.3~307^2
</code></pre>

<p>Voila, at least <a href="https://github.com/kubernetes/kubernetes/releases/tag/v1.4.0-alpha.3" rel="nofollow noreferrer"><code>v1.4.0-alpha.3</code></a> contains <a href="https://github.com/kubernetes/kubernetes/pull/23265/commits" rel="nofollow noreferrer">PR 23265</a> </p>
