Skip to content

Instantly share code, notes, and snippets.

@rpatel3001
Last active March 1, 2017 21:18
Show Gist options
  • Save rpatel3001/705c7cd17b8dbe29602c2c115185622a to your computer and use it in GitHub Desktop.
Save rpatel3001/705c7cd17b8dbe29602c2c115185622a to your computer and use it in GitHub Desktop.
file1:
This is A teast line
Another testing sentence
let's showthe difference
file2:
This is a test line
One more bit of text
let's show the difference
git diff file1 file2:
-This is A teast line
-Another testing sentence
-let's showthe difference
+This is a test line
+One more bit of text
+let's show the difference
git diff --word-diff file1 file2:
This is [-A teast-]{+a test+} line
[-Another testing sentence-]{+One more bit of text+}
let's [-showthe-]{+show the+} difference
desired output:
This is [-A teast-]{+a test+} line
[-Another testing sentence-]
{+One more bit of text+}
let's [-showthe-]{+show the+} difference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment