diff patch
Jul. 3rd, 2010 12:06 amMake a patch:
$ diff -u oldfile newfile >> file.patch
(> overwrites, >> appends). The -u means unified format. Apply patch to (some other version of) oldfile (yes it does have to have the same name, no you don't have to specify the name, it figures out on its own which file to apply the patch to, and yes it does overwrite the old version):
$ patch > file.patch
Creating a patch that creates a new file: to do this you have to compare directories, not files. Yikes! Before doing anything else get Dreamhack up to date, and then get rid of all the clutter.
To make a patch comparing directories:
diff -u -r -N ~/temp4 ~/temp5 > folder.patch
the -r makes it recursive, and the -N means new files can be created as part of the patch.
$ diff -u oldfile newfile >> file.patch
(> overwrites, >> appends). The -u means unified format. Apply patch to (some other version of) oldfile (yes it does have to have the same name, no you don't have to specify the name, it figures out on its own which file to apply the patch to, and yes it does overwrite the old version):
$ patch > file.patch
Creating a patch that creates a new file: to do this you have to compare directories, not files. Yikes! Before doing anything else get Dreamhack up to date, and then get rid of all the clutter.
To make a patch comparing directories:
diff -u -r -N ~/temp4 ~/temp5 > folder.patch
the -r makes it recursive, and the -N means new files can be created as part of the patch.