title: How to move the HEAD to the latest date in git?
body: <p>What I wish to do is to get the version of the file that has a specific comment, get it and use it, then change it to the latest code.</p>
  
  <pre><code>git log -g --grep="code submitted version 0.1.2.3"
  </code></pre>
  
  <p>This returns a hash <code>123456</code>, then I do:</p>
  
  <pre><code>git checkout 123456
  </code></pre>
  
  <p>and use the older version.</p>
  
  <p>Now I want to change the <code>HEAD</code> back to the latest. This I could not do.
  I have tried:</p>
  
  <pre><code>git reset --hard
  git clean -f
  git pull
  </code></pre>
  
  <p>Any ideas?</p>