Skip to content

Instantly share code, notes, and snippets.

@hickford
Last active December 17, 2015 18:58
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 hickford/5656513 to your computer and use it in GitHub Desktop.
Save hickford/5656513 to your computer and use it in GitHub Desktop.
Unified diff example `diff -u alice.txt bob.txt > unified-diff.txt`
Alice was beginning to get very tired of sitting by her sister on the
bank, and of having nothing to do: once or twice she had peeped into the
book her sister was reading, but it had no pictures or conversations in
it, 'and what is the use of a book,' thought Alice 'without pictures or
conversation?'
Bob was beginning to get very tired of sitting by her sister on the
bank, and of having nothing to do: once or twice she had peeped into the
book her sister was reading, but it had no pictures or conversations in
it, 'and what is the use of a book,' thought Bob 'without pictures or
pages or
conversation?'
--- alice.txt Mon May 27 11:20:01 2013
+++ bob.txt Mon May 27 11:21:14 2013
@@ -1,5 +1,6 @@
-Alice was beginning to get very tired of sitting by her sister on the
+Bob was beginning to get very tired of sitting by her sister on the
bank, and of having nothing to do: once or twice she had peeped into the
book her sister was reading, but it had no pictures or conversations in
-it, 'and what is the use of a book,' thought Alice 'without pictures or
+it, 'and what is the use of a book,' thought Bob 'without pictures or
+pages or
conversation?'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment