Hacker News new | ask | show | jobs
by technojamin 965 days ago
That's exactly why the author included it. Your definition seems appropriate at first and is probably what most people assume: "ours" refers to "my current branch" (HEAD), and "theirs" refers to "the other branch".

This breaks down during rebase, where the terminology gets reversed. The definitions are more accurately:

- "Ours" refers to "the branch whose HEAD will be the 1st parent of the merge commit" (during merge) or "the branch who will get commits applied on top of its HEAD" (during rebase)

- "Theirs" refers to "the branch whose HEAD will be the 2nd parent of the merge commit" (during merge) or "the branch whose commits will be applied on top of the other branch" (during rebase)

This gets a little more complicated during "octopus merges", where there are multiple "theirs" branches.