Is there a command-line equivalent to kdiff3 that allows selective merging? [closed]

StackOverflow https://stackoverflow.com/questions/16408438

  •  14-04-2022
  •  | 
  •  

문제

kdiff3 is a GUI diff tool that allows you to create a diff of two/three files and selectively choose which lines make up the merged file. Is there a command-line equivalent?

도움이 되었습니까?

해결책

You should try

vimdiff file1 file2

Ex :

enter image description here

You can select lines (from command mode to visual mode) with shift+v, copy with yy, paste with p and switch into files with ctrl+ww

See http://vimdoc.sourceforge.net/htmldoc/diff.html

다른 팁

Yes, vimdiff (quick tutorial linked) is quite good at it. Being part of VIM, you will have to learn the key strokes you need to accept or refuse changes.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top