Permanently reversing a patch-file

You can use the tool interdiff(1) from patchutils. In particular, the man page for interdiff says: To reverse a patch, use /dev/null for diff2. So, $ interdiff -q file.patch /dev/null > reversed.patch The -q / –quiet prevents the insertion of reverted: lines.

Git apply patch fails silently (no errors but nothing happens)

I found this while googling for the issue: http://data.agaric.com/git-apply-does-not-work-from-within-local-checkout-unrelated-git-repository git apply will fail to do anything when used within a local checkout of a git repository (other than the one for the project the patch is made for), such as if you are patching a module that is within a site that is in Git … Read more

apply svn patch to git repository

I’ve had a few issues applying SVN generated patches with git. I’d recommend applying any subversion patches directly with patch command, and use git to verify that said patch was successfully applied. $ patch -p0 < xxx_parser.patch $ git diff

Git apply skips patches

I found out the problem by running patch -p1 < failing.patch which printed: can’t find file to patch at input line 5 and reminded me that I was not in the root directory. I can’t understand why no one had asked this before and why is the verbose message not verbose. Also, not even the … Read more