Skip to content

Instantly share code, notes, and snippets.

@javierfdezg
Last active August 29, 2015 14:17
Show Gist options
  • Save javierfdezg/49851ee56d5032d2c4f2 to your computer and use it in GitHub Desktop.
Save javierfdezg/49851ee56d5032d2c4f2 to your computer and use it in GitHub Desktop.
Creating and applying patches using git diff
# Creating a patch:
cd /path/of/the/root/of/the/project
git diff --no-prefix > /path/to/patch_file
#Applying a patch
cd /path/of/the/root/of/the/project
patch -p0 < /path/to/patch_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment