</pre>
</div>
</div>
<div class="paragraph">
<p>It is sometimes useful to be able to checkout a commit that is not at
the tip of any named branch, or even to create a new commit that is not
referenced by a named branch. Let&#8217;s look at what happens when we
checkout commit <code>b</code> (here we show two ways this may be done):</p>
</div>
<div class="listingblock">
<div class="content">
<pre>$ git checkout v2.0  # or
$ git checkout master^^

   HEAD (refers to commit 'b')
    |
    v
a---b---c---d  bran