I know that I can use git merge-base to determine the common ancestor when performing a git merge, but it looks like this is not true for git rebase
Here is my setup before rebase:
master branch: A--Y--(C)
and dev branch: A-----C--D
(C) is the outcome of me rebasing A--C onto A--Y, same content, but different commit message
git merge-base master dev will return A, and if I do git merge dev, I will see both (C) and C in my history
git rebase master, outcome is:
A--Y--(C)--(D) where (D) is D after rebase
Does git rebase 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 master, C ended up as a no-op?