<p>I want to find out which version of kubernetes code I am reading. It spend  too much time  to build the source code.</p>

<p>I don't entirely follow your question. If you're building from source, it's not necessary that you're on a given version at all. You're a lot more likely to be "between" versions.</p>

<p>Your best bet is to look at</p>

<pre><code>git describe --exact-match --abbrev=0
</code></pre>

<p>It will give you the latest tag before the commit you're on. Tags are likely to indicate versions.</p>

<p>Look at the output of</p>

<pre><code>git tag --list
</code></pre>

<p>to see all available tags.</p>

<p>For a more interactive view, you should be able to look through</p>

<pre><code>git log --decorate
</code></pre>
