>>765521Imagine these two branches, A and B, where each number is a unique changeset, and where the choice of number represents time the change was made:
A: 1 2 3 5 6 7
B: 1 2 3 4 5 7 8
How does one merge A into B? Simple: let each number be a diff that, when applied to the previous state of the repository, implements the changes that were introduced in that changeset. Find the latest common changeset of A and B, and revert B to that state. Now take from both A and B the changesets unique to each, and order them by the time they were made. Now apply them sequentially, and if any problem occurs, prompt the user to resolve the issue.
Means to deal with more complicated situations, if people insist on getting into them, can be devised on top of this simple calculus of changes.