« Searching with find | Digital Dirt: How to Clean Up Your On-line Profile »

How to create a patch

Generating patches, files containing the difference between files, is the domain of diff programs.
Creating Patch :

diff -Naur olddir newdir > new-patch

Note: the symbol > will redirect the output to the file new-patch.

To apply the patch
go to olddir and do :

patch -p1 <new-patch

And if you want some files to be excluded from doing a diff use -x option like

diff -Naur -x *.o olddir newdir > new-patch
this will exclude .o files when doing a diff

Read More here :
http://drupal.org/diffandpatch
http://www.ss64.com/bash/diff.html
http://www.cpqlinux.com/patch.html
http://www.linuxjournal.com/article/1237

Comments

Leave a Reply