Skip to content

Instantly share code, notes, and snippets.

@loicm
Created August 30, 2012 16:04
Show Gist options
  • Save loicm/3531809 to your computer and use it in GitHub Desktop.
Save loicm/3531809 to your computer and use it in GitHub Desktop.
git diff with --word-diff
$ git diff HEAD^ HEAD
diff --git a/foo.txt b/foo.txt
index fbe6624..1803e6a 100644
--- a/foo.txt
+++ b/foo.txt
@@ -1 +1 @@
-Ceci est une poule.
+Ceci est un poulet.
$ git diff --word-diff=plain HEAD^ HEAD
diff --git a/foo.txt b/foo.txt
index fbe6624..1803e6a 100644
--- a/foo.txt
+++ b/foo.txt
@@ -1 +1 @@
Ceci est [-une poule.-]{+un poulet.+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment