title: Homebrew update fail: "Please, commit your changes or stash them before you can merge"
body: <p>I am running:</p>
  
  <pre><code>brew update
  </code></pre>
  
  <p>And I get an error:</p>
  
  <pre><code>error: Your local changes to the following files would be overwritten by merge:
      samtools.rb
  Please, commit your changes or stash them before you can merge.
  Aborting
  </code></pre>
  
  <p>It turns out this is a well known error. In fact, it's mentioned on the <a href="https://github.com/mxcl/homebrew/wiki/Common-Issues#brew-update-complains-about-untracked-working-tree-files" rel="noreferrer">Homebrew wiki</a>:</p>
  
  <pre><code>After running brew update, you receive a git error warning about untracked files or local changes that would be overwritten by a checkout or merge, followed by a list of files inside your Homebrew installation.
  
  This is caused by an old bug in in the update code that has long since been fixed. However, the nature of the bug requires that you do the following:
  
  cd $(brew --repository)
  git reset --hard FETCH_HEAD
  
  If brew doctor still complains about uncommitted modifications, also run this command:
  
  cd $(brew --repository)/Library
  git clean -fd
  </code></pre>
  
  <p>I followed those instructions and am still seeing the same error. What is wrong?</p>