title: GitBucket: error: Your local changes to the following files would be overwritten by merge
body: <p>I have searched everywhere and tried various solutions but am still getting the error:
  <strong>Your local changes to the following files would be overwritten by merge</strong></p>
  
  <p>i have nothing to commit as status tells me the following:</p>
  
  <pre><code>  # On branch develop
    # Your branch is behind 'origin/develop' by 1 commit, and can be fast-forwarded.
    #   (use "git pull" to update your local branch)
    #
    nothing to commit, working directory clean
  </code></pre>
  
  <p>So then I do a git pull, then get the following:</p>
  
  <pre><code>  Updating 67020e6..6dd23de
    error: Your local changes to the following files would be overwritten by merge:
  app/filename.php
    Please, commit your changes or stash them before you can merge.
    Aborting
  </code></pre>
  
  <p>But as I have nothing to commit and if I do a git stash I get <strong>No local changes to save</strong></p>
  
  <p>So how can I fix the problem and download and update my local machine with my remote amends.</p>
  
  <p>Bit of history incase:
  I have to local machines one at home and work I have done the amends at home and pushed them and I am now trying to update my local work machine with these updates.</p>
  
  <p><strong>EDIT UPDATE</strong>
  As I cannot answer my own question for a while I found what for me solved this answer:</p>
  
  <p>on the branch I wrote:</p>
  
  <pre><code>    git reset --hard
  </code></pre>
  
  <p>Then the pull worked.</p>