Linux create patch, apply and revert

来源:互联网 发布:双喜软件怎么样 编辑:程序博客网 时间:2024/05/17 06:07


cp file file.orig
make your edits to file
create patch

diff -u file file.orig > file.patch

apply patch
patch -p0 < file.patch

reverse patch
patch –p0 -R < file.patch


0 0