Creating the patch
If you want to port some changes from one source directory to another, you can use diff and patch. First you create a file which contains the information of the changes, so called patch. This can be done with the diff tool, or if your code uses Subversion, then you can use the svn diff command:
$> svn diff > changes.patch
Applying the patch
Then you can copy this patch to another source directory where you can apply it using the patch tool:
$> patch -p0 < changes.patch
Mind the -p0 option. It indicates to interpret the directory structure just like the one where the patch was generated.
Undo
If you test the patch and you decide you want to remove it, then you can do it from the same directory where you applied it with:
$> patch -R -p0 < changes.patch