A while ago I started using Mark Jaquith’s gitified WordPress for contributing to Core.

The trouble is that the patches generated by git diff aren’t exactly the same as the ones generated by svn. I’ve tried several cooky solutions until I found this one.

So here’s the easies way to create a patch from a git repository, to be aplied to an svn repository:

git diff --no-prefix > ~/some-feature.diff

To avoid typing --no-prefix each time, you can enable it by default:

git config --global diff.noprefix true

And then, to apply it:

patch -p0 < ~/some-feature.diff

The important thing is that you use the exact same command you would use to apply a patch created from svn.

Update: Wrote Contributing To WordPress (Using Github).