title: Interactive rebase of a branch with its point of divergence from master
body: <p>Let's say I have a topic branch whose entire history I want to rewrite since it was originally created from master for a pull request. For whatever reason, it is not easy or obvious using <code>git log</code> to determine the commit hash I want to pass to</p>
  
  <pre><code>git rebase -i &lt;commit&gt;
  </code></pre>
  
  <p>I know I can use <code>git merge-base &lt;branch1&gt; &lt;branch2 || master&gt;</code> to find the commit that two references can trace their ancestry from and can use that to determine the commit. What I would like to know is if there is a better way to interactively rebase this whole branch (whether master has advanced or not) than using</p>
  
  <pre><code>git rebase -i `git merge-base my_branch master`
  </code></pre>
  
  <p>EDIT: I do not want to change the parent of the first commit made on this branch so <code>git rebase -i master</code> would only work in the case where both master has not advanced since the branch was created and the branch was created from the commit master currently points to.</p>