[lug] How do I get the merge I want?

Jeffrey S. Haemer jeffrey.haemer at gmail.com
Tue Mar 4 09:17:17 MST 2014


I want to merge a pair of files, with hunks that differ marked the way
they'd be by, say, "git merge":

<<<<<< first-file
line1
line2
...
========
linea
lineb
...
>>>>>>> second-file

I do want the entire, merged file, not just the differences that a simple
diff(1) will report.

This seems like a common-enough task, so there must be a command tailored
to it. I just haven't found it yet. I can't, for example, even get merge(1)
to do the job without a fake ancestor file that differs from both files
exactly where they already differ, which begs the question.

So far, the best I've found is this:

   $ diff3 -m file2 file1 file2

which does work but is -- well, to me -- a bit non-obvious.

Can someone please just serve me up a face-palm moment, and tell me what
I'm overlooking?

And yes, I could put the two versions into git in different branches and
then call "git merge." :-)

-- 
Jeffrey Haemer <jeffrey.haemer at gmail.com>
720-837-8908 [cell], http://seejeffrun.blogspot.com [blog],
http://www.youtube.com/user/goyishekop [vlog]
*פרייהייט? דאס איז יאַנג דינען וואָרט.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20140304/397a686e/attachment.html>


More information about the LUG mailing list