Copy only difference (kdiff, winmerge, any diff like tool)

前端 未结 6 982
名媛妹妹
名媛妹妹 2021-02-05 15:42

Is there possibility of copy ONLY difference of two files? Like in winmerge, but, I can\'t find this option\"enter

6条回答
  •  情歌与酒
    2021-02-05 16:10

    WinMerge has a built-in and simple way to generate such "diff only" files, that they called "patches".

    Click on "Tool", then on "Generate Patch...", and enter where you want to store the result:

    You will obtain (for your example) the file

    4,8c4,8
    < HELLO WORLD
    < HELLO WORLD
    < HELLO WORLD
    < HELLO WORLD
    < HELLO WORLD
    ---
    > 
    > 
    > 
    > 
    > 
    

    That uses the standard, compact way of representing diff and is easy to manipulate.

提交回复
热议问题