How To Create A Patch For Updated Script

Recently I had to make few changes on a freely distributed CGI script. We do these changes to fix bugs or add useful features.

We use patch files to share those changes with other developers and those patches are useful to re-apply them to new versions of the script.

The package we use for this is ‘diff’. You can learn more about it from ‘man diff’ and play with it.

This is the command I use to generate patch files:

diff -crB original_file updated_file > file.patch

 

Advertisements
%d bloggers like this: