title: Reset Git to commit without changing HEAD to detached state
body: <p>I'd like to restore the files of the git working copy to a given commit, without setting that commit as the HEAD commit.</p>
  
  <p>If I git checkout to a given commit I obtain a detached HEAD, and after commiting changes, the commit tree would look something like:</p>
  
  <pre><code>A
  |
  B
  |
  C  
  | \
  D  E
  </code></pre>
  
  <p>While the behaviour I'd like to obtain is:</p>
  
  <pre><code>A
  |
  B
  |
  C
  |
  D
  | &lt;- git command so my files are restored to C, but my HEAD still points to D
  E
  </code></pre>
  
  <p>Thanks</p>