Skip to content

Instantly share code, notes, and snippets.

@jbosse
Last active February 26, 2016 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbosse/103da2f339d6cdff39d6 to your computer and use it in GitHub Desktop.
Save jbosse/103da2f339d6cdff39d6 to your computer and use it in GitHub Desktop.
Make a patch

Working with Patches

from https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/

from the branch with changes

git format-patch <branched-from> --stdout > <patch-name>.patch

go to the branch to patch

git checkout <branch-to-patch>

check the changes

git apply --stat <patch-name>.patch

test the patch

git apply --check <patch-name>.patch

apply the patch

git am --signoff < <patch-name>.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment