Skip to content

Instantly share code, notes, and snippets.

Created March 23, 2017 09:56
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 anonymous/9d02ec5cd1d4d57d7c1a87bae2077bf5 to your computer and use it in GitHub Desktop.
Save anonymous/9d02ec5cd1d4d57d7c1a87bae2077bf5 to your computer and use it in GitHub Desktop.
git format-patch
D:\marcin\git\work1> git format-patch -1
0001-Separator.patch
D:\marcin\git\work1> cd..
D:\marcin\git> cd work2
D:\marcin\git\work2> git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
D:\marcin\git\work2> git am < ..\work1\0001-Separator.patch
Applying: Separator
error: patch failed: index.txt:1
error: index.txt: patch does not apply
Patch failed at 0001 Separator
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".git
D:\marcin\git\work2> git status
On branch master
Your branch is up-to-date with 'origin/master'.
You are in the middle of an am session.
(fix conflicts and then run "git am --continue")
(use "git am --skip" to skip this patch)
(use "git am --abort" to restore the original branch)
nothing to commit, working directory clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment