Apply a patch file
Today I learned how to create and apply a patch file. If you want to quickly create patch a file from your current changes just run: git diff > mypatch.patch or if like you want just want specific changes then stage then and run: git diff --cached > mypatch.patch then to apply them all you need is git apply mychanges.patch Unfortunately if there are conflicts then will just give you an error: patch does not apply ...