title: Rollback in Git
body: <p>Question about doing a rollback in git:</p>
  
  <p>Let's say the git SHA of the commit I want to rollback to is: <code>12345</code>.</p>
  
  <p>I tried:</p>
  
  <pre><code>git checkout 12345
  git checkout -b rollback
  git push origin rollback
  </code></pre>
  
  <p>Then, when I attempt to compare 'rollback' with master, it says there are no differences - why? </p>
  
  <p>UPDATE: I compared master branch and rollback branch using Github and found no differences.</p>
  
  <p>I found that the following works:</p>
  
  <pre><code>git checkout -b current-state-master
  git checkout master
  git checkout 12345
  git push origin -f
  </code></pre>
  
  <p>I see why the second one works, but I don't know why the first approach did not work. </p>