Previous: sMerge, Up: Comparing-Diffing-Merging [Index]
See (emacs)Emerge
It’s not unusual for programmers to get their signals crossed and modify the same program in two different directions. To recover from this confusion, you need to merge the two versions.
Merge two specified files.
Merge two specified files, with reference to a common ancestor.
Merge two buffers.
Merge two buffers with reference to a common ancestor in a third buffer.
The Emerge commands compare two files or buffers, and display the comparison in three buffers: one for each input text (the “A buffer” and the “B buffer”), and one (the “merge buffer”) where merging takes place. The merge buffer shows the full merged text, not just the differences. Wherever the two input texts differ, you can choose which one of them to include in the merge buffer.
If a common ancestor version is available, from which the two texts to be merged were both derived, Emerge can use it to guess which alternative is right. Wherever one current version agrees with the ancestor, Emerge presumes that the other current version is a deliberate change which should be kept in the merged version. Use the ‘with-ancestor’ commands if you want to specify a common ancestor text. These commands read three file or buffer names—variant A, variant B, and the common ancestor.