Skip to content

Instantly share code, notes, and snippets.

@davidchambers
Created October 2, 2012 00:23
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 davidchambers/3815436 to your computer and use it in GitHub Desktop.
Save davidchambers/3815436 to your computer and use it in GitHub Desktop.
Handy command-line combos

Apply a patch on the clipboard to the current Git/Hg repo:

pbpaste | patch -p1

Or, if the trailing "\n" is missing:

pbpaste | xargs -0 echo | patch -p1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment