Skip to content

Instantly share code, notes, and snippets.

@abhishek77in
Last active December 12, 2015 00:09
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 abhishek77in/4681989 to your computer and use it in GitHub Desktop.
Save abhishek77in/4681989 to your computer and use it in GitHub Desktop.
Crate a git patch for a single commit, appy the patch

Creating a patch

git format-patch -1 commit-sha

Applying a patch

git apply PATCH_FILENAME

Example -

git format-patch -1 ed4154afec5a7845beb5f6117433e11c42a14dc0
git apply 0001-commit-message.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment