简体   繁体   中英

How to apply “non-unified diff”?

If I create a non-unified diff like so

diff original.txt edited.txt > 1.patch
cp original.txt test.txt

I suppose that the first filename should be the untouched/original file, and the second how the original should look after the patch?

How do I then apply the patch to test.txt ?

就这么简单

patch test.txt 1.patch

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM