title: Git - cannot either merge or rebase when merging feature branch onto updated develop
body: <p>So I am stuck in the baffling endless loop of merge conflicts when I am trying to merge my feature branch onto my updated develop branch.</p>
  
  <p>I have a feature branch that is based on an old commit from develop branch. Develop branch in the meantime, has been updated and is on a different commit. I want to apply and 'merge' the changes from the feature branch onto the develop branch and all the conflicting files should be based on the changes made in the feature branch.</p>
  
  <p>That state I am currently at: I have fetched and successfully merged changes from origin/dev onto my local dev branch. Now I want to merge the feature branch onto the dev branch. However, when I try to</p>
  
  <pre><code>git checkout dev
  git merge feature-branch
  </code></pre>
  
  <p>the command results in the following:</p>
  
  <pre><code>error: Your local changes to the following files would be overwritten by merge:
          gulpfile.js
          package-lock.json
          package.json
  </code></pre>
  
  <p>When I try to rebase the feature branch based on the dev branch:</p>
  
  <pre><code>git checkout feature-branch
  git rebase dev
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>Cannot rebase: You have unstaged changes.
  Please commit or stash them.
  </code></pre>
  
  <p>Note that both of the branches are up-to-date respectively. Dev branch is up-to-date with origin/dev with nothing to commit and with the working tree clean.
  Same goes for the feature branch, although the feature branch has never been pushed to repo and only exists locally.</p>
  
  <p>The desired result is to apply changes made in the feature branch onto the dev branch and use feature changes on all conflicting files</p>
  
  <p>Also, note that this is not a professional environment. We have not really decided on a specific strategy as our git knowledge is still limited. But this is an error (obviously human one) that has occurred several times already, so I am glad for any tips for the future.</p>
  
  <p>EDIT: So I managed to fix the specific problem by pushing the feature branch to the repo and merged it using pull request. However, this did not fix (or answered the actual issue of having merge conflict because of local changes when there aren't any)</p>