Skip to content

Instantly share code, notes, and snippets.

@bouassaba
Last active August 29, 2015 14:08
Show Gist options
  • Save bouassaba/7af002af748edb10b2e1 to your computer and use it in GitHub Desktop.
Save bouassaba/7af002af748edb10b2e1 to your computer and use it in GitHub Desktop.
Patch and Diff usage
diff -u original.c new.c > original.patch
# To create a patch for an entire source tree, make a copy of the tree:
# cp -R original new
diff -rupN original/ new/ > original.patch
# Apply patch
patch foo.txt < bar.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment