title: Push to remote branch failing after squashing local commits
body: <p>I made three commits to a branch and pushed each of them to remote. I then needed to squash the commits, so I used: </p>
  
  <pre><code>git reset --soft HEAD~3 &amp;&amp; git commit
  git push --force
  </code></pre>
  
  <p>At the second line, I got a fatal error: </p>
  
  <pre><code>The current branch [BRANCH-NAME] has no upstream branch.
  To push the current branch and set the remote as upstream.
  </code></pre>
  
  <p>I tried its suggested command with <code>git push --set-upstream origin [BRANCH-NAME]</code>, but am being told that the tip of the current branch is behind its remote counterpart. Looking back, it makes sense, as I'm currently on index 1 of my local branch while the head is at index 3 on the remote. </p>
  
  <p>What I want to do now is basically to have the squashed version of the branch (which I have locally) replace the non-squashed version that is in the remote. What's the right approach here? </p>
  
  <p>I've looked at <a href="https://stackoverflow.com/questions/23401652/fatal-the-current-branch-master-has-no-upstream-branch">this</a> and a couple of others but they haven't helped.</p>