title: What does git rebase use to determine common ancestor?
body: <p>I know that I can use <code>git merge-base</code> to determine the common ancestor when performing a <code>git merge</code>, <strong>but it looks like this is not true for</strong> <code>git rebase</code></p>
  
  <p>Here is my setup before <code>rebase</code>:<br>
  <code>master branch</code>: <code>A--Y--(C)</code><br>
  and <code>dev branch</code>: <code>A-----C--D</code><br>
  (C) is the outcome of me rebasing A--C onto A--Y, <strong>same content, but different commit message</strong></p>
  
  <p><code>git merge-base master dev</code> will return A, and if I do <code>git merge dev</code>, I will see both <strong>(C) and C</strong> in my history</p>
  
  <p><code>git rebase master</code>, outcome is:
  A--Y--(C)--(D) where (D) is D after rebase</p>
  
  <p>Does <code>git rebase</code> consider (C) as the common ancestor? (This feels pretty hard to do in code) I am guessing it still uses A, but when it is cherry picking C,D to append to the end of <code>master</code>, C ended up as a <strong>no-op</strong>?</p>