An example is better that an explanation. Here we will patch to upgrade from 0.1.0 release to 1.0.0 release.
$ ls cole-0.1.0/ cole-0.1.0-1.0.0.diff $ cd cole-0.1.0 $ patch -Np1 < ../cole-0.1.0-1.0.0.diff $ cd .. $ mv cole-0.1.0 cole-1.0.0 $ ls cole-1.0.0/ cole-0.1.0-1.0.0.diff |
If you fix or add some code, we will very glad if you send the patch to the maintainer. The right way to make a patch is to have two directories: the original (here cole-1.0.0) and another when your changes have been made (here cole-1.0.0-myfix).
$ ls cole-1.0.0/ cole-1.0.0-myfix/ $ LC_ALL=C TZ=UTC0 diff -Naur cole-1.0.0 cole-1.0.0-myfix > cole-1.0.0-patch $ ls cole-1.0.0/ cole-1.0.0-my-fix/ cole-1.0.0-patch |
You can then send cole-1.0.0-patch to the maintainer explaining what did you fix or what did you add.