I’m a huge fan of the oldschool “patch” command, and sometimes in the wild I use Gitorious’ “raw diff” view which puts the changes in easy to read patch format. However, you can also do this on the command line to create a patch file that can be applied using “patch -p0 < patchfile".
git diff –no-prefix > patchfile
When you want to apply the patch to your old local copy:
patch -p0 < patchfile
Or, if you have an existing “git diff” patch file that was created without the “–no-prefix” option, you can apply that patch and ignore the default a/ b/ source prefixes with:
Tweetpatch -p1 < patchfile
Erik
Friday, September 16, 2011
linux administration - tips, notes and projects
No Comment