title: How to git pull without overwriting local changes?
body: <p>I tried pushing some changes I made to my teams repo but received the following error:</p>
  
  <pre><code>$ git add .
  $ git commit -m "message"
  $ git push origin master
  ! [rejected]  master -&gt; master (fetch first)
  </code></pre>
  
  <p>I then tried doing a fetch (as instructed by the git hint) and received: </p>
  
  <pre><code>$ git fetch
  $ git push origin master
  ! [rejected]  master -&gt; master (non-fast-forward)
  </code></pre>
  
  <p>Now I am being instructed to <code>git pull</code> but am afraid my local changes will be overwritten. </p>
  
  <p>After some googling I read that I should do a <code>git stash</code> first to protect my local changes but am now receiving: </p>
  
  <pre><code>$ git stash
  No local changes to save
  </code></pre>
  
  <p>So my question is what should I do next to successfully do a push while not overwriting any of my local changes in the process?</p>
  
  <p>Thanks!</p>