title: change a git commit already pushed
body: <p>I accidently overwrote another developper's changes when doing a merge in git. I know how to <a href="https://stackoverflow.com/questions/927358/how-to-undo-the-last-git-commit">undo the last commit</a>, that is, my merge.</p>
  
  <p>My problem is that I already pushed those commits into our online repository. So if I roll back, do my merge merge again (with his modifications this time) and try to push it again, there will be a conflict (right?). What is right the way to handle this ?</p>
  
  <p><strong>EDIT</strong>
  To clarify, here is what the situation looks like :</p>
  
  <pre><code>commit A --- commit B --- merge
  </code></pre>
  
  <p>But in the merge I accidentally discarded the modifications made in commit A. This isn't really a problem. I know how to make the changes locally (undo the merge). <strong>But</strong> my problem is that the whole thing has been pushed into our shared repository (think github or bitbucket).</p>