title: error: Your local changes to the following files would be overwritten by checkout
body: <p><em>This question is similar to <a href="https://stackoverflow.com/questions/14318234/how-to-ignore-error-on-git-pull-about-my-local-changes-would-be-overwritten-by-m">this one</a>, but more specific.</em></p>
  <p>I have a project with two branches: <code>staging</code> and <code>beta</code>.
  I develop on <code>staging</code>, and use the <code>master</code> branch to fix bugs. So if I'm working on staging and I see an error, I change to <code>master</code> branch:</p>
  <pre><code>git checkout master
  </code></pre>
  <p>and do the stuff:</p>
  <pre><code>git add fileToAdd
  git commit -m &quot;bug fixed&quot;
  </code></pre>
  <p>and then I merge with both branches:</p>
  <pre><code>git checkout staging
  git merge master
  git checkout beta
  git merge beta
  </code></pre>
  <p>And doesn't matter if there are other files on the working tree.</p>
  <p>But now, <strong>when I try to change to the <code>master</code> branch, I'm getting an error</strong>:</p>
  <pre><code>error: Your local changes to the following files would be overwritten by checkout:
  src/Pro/ConvocationBundle/Controller/DefaultController.php
  Please, commit your changes or stash them before you can switch branches.
  Aborting
  </code></pre>
  <p>I thought that I should remove the file from the staging area:</p>
  <pre><code>git reset HEAD src/Pro/ConvocationBundle/Controller/DefaultController.php
  </code></pre>
  <p>But I'm getting the same error. If I do <code>git status</code>, I get <code>No changes to commit</code></p>