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
cp file file.orig
make your edits to file
create patch
diff -u file file.orig > file.patch
patch -p0 < file.patch
patch –p0 -R < file.patch