Git diff pacth

How to create a patch with git diff:

git diff HEAD~2 > changes.diff


How to use it:

patch -Np2 -i changes.diff

thanks to Andy ;)

1 Response to “Git diff pacth”


  1. 1 Stefan Näwe April 30, 2009 at 14:20

    Uhm…
    What about ‘git format-patch’ and ‘git am’ or ‘git apply’ ?


Leave a Reply




Last Regedor’s twitts

Last Regedor's bookmarks