Skip to content. | Skip to navigation

Personal tools
Log in
Sections
You are here: Home How to do a diff on a word/character basis rather than on a line basis

How to do a diff on a word/character basis rather than on a line basis

published Sep 13, 2017 02:28   by admin ( last modified Sep 13, 2017 02:28 )

How to do a diff on a word/character basis rather than on a line basis

Use git's diff like so:

git diff --word-diff=color --word-diff-regex=. file1 file2

 

From command line - Using 'diff' (or anything else) to get character-level diff between text files - Stack Overflow