title: git: how to sync to latest revision
body: <p>Warning: git novice here.</p>
  
  <p>I have downloaded the source code of an open-source project (ffmpeg, to be exact) using git (<code>git clone</code>). I checked out an older revision in order to do test it (<code>git checkout [version number]</code>), and git told me that I'm now in a detached HEAD state. Now I want to resync again to the latest remote revision, but I don't know how.</p>
  
  <p>I don't want to create any local branches. I haven't made any local changes that I want to keep. I don't want to do any of those fancy things that git can do when you are a serious developer (which I'm not). I just want my local source tree to be the same than the latest remote version.</p>
  
  <p><code>git checkout .</code> doesn't do anything. <code>git pull</code> tells me that I'm not currently on a branch. Short of erasing everything and do a <code>git clone</code> again, what else can I do?</p>