title: Undo a git merge created by a bitbucket pull request
body: <p>I know there is a lot of information about undoing a merge in git, but I can't seem to find any concensus on how to do this in my specific situation.</p>
  
  <p>Someone essentially merged our <code>develop</code> branch in to our <code>master</code> branch via a pull request in bitbucket. This just happened today, so it's the last thing that was done on the master branch (we don't have to worry about other commits on top of the merge commit). </p>
  
  <blockquote>
    <p><strong>Note:</strong> We host bitbucket ourselves, so we have an older version of bitbucket. There is no revert pull request option.</p>
  </blockquote>
  
  <p>From what I've read, there is essentially two ways of handling this in git:</p>
  
  <ol>
  <li><p><code>git reset --hard *&lt;SHA of commit before the merge&gt;*</code></p>
  
  <ul>
  <li>This will remove the merge commit as if it never happened.</li>
  <li>Everywhere I read that "it's bad practice to rewrite history" or "never do this on a publicly shared repo" but they never really explain why not to do it. This seems like it will fix the problem, and it won't become a problem 6 months from now when we actually do want to redo this merge from <code>develop</code> to <code>master</code></li>
  <li>If this is the best way to do it, and we do it, what happens to the pull request in bitbucket? That pull request still exists in bitbucket, but we are removing the merge commit it created, so will that mess up bitbucket in any way?</li>
  </ul></li>
  <li><p><code>git revert -m 1 *&lt;SHA of the merge commit&gt;*</code></p>
  
  <ul>
  <li>This will create a new commit that undoes the changes that were done by the merge</li>
  <li>This would be fine, except we do intend to merge <code>develop</code> into <code>master</code> at a later date (the next release), and from what I've read, we would have to remember to revert our revert commit before doing this, because otherwise when we merge <code>develop</code> into <code>master</code>, the changes that we revert today won't be included. I really don't want to have this become a problem 6 months from now, when no one remembers this revert.</li>
  </ul></li>
  </ol>
  
  <p><strong>TL;DR:</strong> I'm hesitant on doing <code>git revert</code> because of the issues it could cause 6 months from now when we do want to do this merge again. I'm also hesitant on doing <code>git reset</code> because everyone seems to warn against doing it, and it could cause issues with the pull request on bitbucket.</p>