Skip to content
Evan Moran edited this page Oct 10, 2013 · 2 revisions

In git you can create patches and apply them. Here is how:

Create a patch from a commit

git format-patch HEAD^ --stdout > output.patch

Create a patch from a stash

git stash show -p [stash@{3}] > output.patch     # The stash reference is optional

Apply a patch from file

git apply output.patch
Clone this wiki locally