filenetbeansidemergefile-diffs

How to merge two files using Diff on some selected points?


I have a file of about 19500+ lines of code. I am doing work on this, and also my friend. We are not using SVN, Git or else.. Now i had done my changes.. How i merge my friends file in my file using Diff (or you suggest me) on some selected highlighted points. I want to ignore some changes from friend.


Solution

  • You can use KDiff3 to do the merge operation. By default it will accept the changes done by both of your, but you can interactively select which version you want. If the common base you both have been working with is named original.c, your version your.c and your friend's friend.c, then the command

    kdiff3 -o out.c original.c your.c friend.c
    

    will start an interactive merge where you can select which of the changes you want to have or not.