diff¶
compare files¶
- side-by-side comparison:
diff -y file1 file2 - unified format:
diff -u file1 file2 - ignore whitespace differences:
diff -w file1 file2
merge files¶
vimdiff¶
- Use
dp(put changes) anddo(get changes) to merge
- sometimes, vimdiff copies more than you want, try the following:
if you get more than one match for ., mark the whole line with v and use :diffget
sdiff¶
- step-by-step side-by-side merging: