I am trying to understand how git revert uses three way merge from
https://stackoverflow.com/a/37151159
Suppose the current branch is B, does command git revert C create a commit D, so that B is the result of three-way merge of C and D with respect to C~ ?
I don't know how you are visualizing it... but this is how I see it:
git revert Cwhile you are standing on B is asking git to do a 3-way merge between B and C~ assuming (forcing git to think) the branching point of both revisions is C.Definition: branching point would be, under normal circumstances, the last revision that is present on the history of both branches. After that revision, the histories of both branches don't share another common ancestor.