title: Git equivalent to hg update
body: <p>Below is a small example with Mercurial and similarly with Git.
  I cannot understand how to make a <code>hg update</code> with Git:</p>
  
  <p>I have a small Mercurial setup with 4 commits - where I step back one commit</p>
  
  <pre><code>hg init
  echo "1" &gt; a.txt; hg commit -A -m "1. commit" a.txt
  echo "2" &gt;&gt; a.txt; hg commit -m "2. commit" a.txt
  echo "3" &gt;&gt; a.txt; hg commit -m "3. commit" a.txt
  echo "4" &gt;&gt; a.txt; hg commit -m "4. commit" a.txt
  hg update -r 3
  thg # or hg view`
  </code></pre>
  
  <p>This gives this picture</p>
  
  <p><img src="https://i.stack.imgur.com/ayYYi.png" alt="thg"></p>
  
  <p>Note that I see all four commit - i.e. both the pre-history and the following commit(s)</p>
  
  <p>Let me try to do the same example using Git</p>
  
  <pre><code>git init
  echo "1" &gt; a.txt; git add a.txt; git commit  -m "1. commit" a.txt
  echo "2" &gt;&gt; a.txt; git commit -m "2. commit" a.txt
  echo "3" &gt;&gt; a.txt; git commit -m "3. commit" a.txt
  echo "4" &gt;&gt; a.txt; git commit -m "4. commit" a.txt # gives for me [master 57bb375]
  </code></pre>
  
  <p>Let me see the commits:</p>
  
  <pre><code>git log --graph --pretty=format:'%h -%d %s (%cr) &lt;%an&gt;' 
  
   * 57bb375 - (HEAD, master) 4. commit (14 minutes ago) &lt;Peter Toft&gt;
   * 724a493 - 3. commit (14 minutes ago) &lt;Peter Toft&gt;
   * bb38732 - 2. commit (14 minutes ago) &lt;Peter Toft&gt;
   * 879c593 - 1. commit (15 minutes ago) &lt;Peter Toft&gt;
  </code></pre>
  
  <p>Good - four commits as expected. Let me go back one commit (similar as hg update)</p>
  
  <pre><code>git checkout 724a493
  </code></pre>
  
  <p>What about the git log now?</p>
  
  <pre><code>git log --graph --pretty=format:'%h -%d %s (%cr) &lt;%an&gt;' 
  
   * 724a493 - (HEAD) 3. commit (19 minutes ago) &lt;Peter Toft&gt;
   * bb38732 - 2. commit (19 minutes ago) &lt;Peter Toft&gt;
   * 879c593 - 1. commit (19 minutes ago) &lt;Peter Toft&gt;
  </code></pre>
  
  <p>gitk will also just show the first 3 commits? </p>
  
  <p>So "git checkout" is <strong>NOT</strong> just similar to "hg update". Where are the following commit(s)?</p>