title: git cannot push after success pull merge local feature branch
body: <p>I am using <code>gerrit</code> for a project, I have a feature branch locally that has two commits (1) (2) diverged from remote develop branch as show in the image </p>
  
  <p><a href="https://i.stack.imgur.com/Edyag.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Edyag.png" alt="Feature branch"></a>.</p>
  
  <p>Before I could push my changes to remote develop, I pulled from remote, merged the changes as shown in the node (m). Then, I tried to push to remote, I got an error message saying there are conflicts between (1) (2) and (3) (4).
  I don't understand why this happened, I thought <code>git push</code> only pushes the merged one (m) to the remote. So to solve this, I have to reset the merge, rebase to the develop, then push, but I feel there should be a better way to deal with this.</p>
  
  <p><strong>EDITS:</strong>
  I already solved the issue by rebase, which is exactly @Marcelo suggested here, cannot go back to get the exact error message, but what happened is when I pull there was conflicts, I fixed the conflicts and merged, and then I type <code>git status</code> it says i am 1 commit ahead of remote, so i did <code>git push origin HEAD:refs/for/developer</code>, and Gerrit won't let me push by saying there is conflicts for commit (1) and (2), not commit (m) as shown in my image... I don't understand this part as i thought <code>push</code> only pushes the commits that are ahead of remote, why the remote says there are conflicts for commit (1) and (2), i suspect that is because of Gerrit's special settings.</p>