zsh alias to make and apply patch with git diff

I keep having to look up [patching with git diff](http://tamsler.blogspot.com/2009/02/patching-with-git-diff.html) to remember the syntax whenever I want to create and apply a patch file.


Create an alias for it. It only uses one file, /tmp/patchfile, so don’t try to manage multiple patches with this (maybe I’ll make more intelligent/sophisticated someday.

In my .zlogin, I now have:

alias makepatch='git diff --no-prefix > /tmp/patchfile'
alias applypatch='patch -p0 < /tmp/patchfile'

To create a patch, makepatch

To apply a patch, applypatch

%d bloggers like this: