git format-patch and git am

Occasionally I need to send a git patch between computers. Yes, I know there are more efficient ways of doing this, but occasionally it needs to happen. So here’s how I do it:

git format-patch --binary master.. --stdout > the.patch

and how to apply it:

git am --signoff < the.patch

Leave a Reply