You can easily create and/or apply a unix patch file from a git diff.

The only difference between a git diff and a unix patch file is that each of the paths in a git diff has an a/ or b/ prefix.

You can either get rid of it when creating the diff (—no-prefix) or when applying the diff (-p1).

This is how its done:

taking care of the prefix when creating the diff: git diff origin/master..head --no-prefix > feature.patch git patch -p0 feature.patch

taking care of the prefix when applying the diff: git diff origin/master..head > feature.patch git patch -p1 feature.patch