9 Interactive Merging with sdiff

With sdiff, you can merge two files interactively based on a side-by-side -y format comparison (see Showing Differences Side by Side). Use --output=file (-o file) to specify where to put the merged text. See Invoking sdiff, for more details on the options to sdiff.

Another way to merge files interactively is to use the Emacs Lisp package emerge. See Emerge in The GNU Emacs Manual, for more information.