Skip to content

Instantly share code, notes, and snippets.

@anscii
Created August 8, 2013 08:08
Show Gist options
  • Save anscii/6182597 to your computer and use it in GitHub Desktop.
Save anscii/6182597 to your computer and use it in GitHub Desktop.
git diff --no-prefix > patchfile
then apply the patch:
patch -p0 < patchfile
If you have an existing "git diff" patch file that was created without the "--no-prefix" option, you can apply that patch via:
patch -p1 < patchfile
this will ignore the default a/ b/ source prefixes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment