http://www.jukie.net/~bart/blog/color-your-word
color your word
[ link: color-your-word
| tags: git |
updated: Sat, 12 Apr 2008 10:27:39 ]
I just discovered a git feature that
has eluded me since v1.4.3, when it was
introduced. It's a way to colour differing words in git diff
output. Maybe you don't
know about it either... allow me demonstrate:
Let's initialize a simple tree:
# git init
# echo some existing text > file
# git add file
# git commit -m"some commit" file
# echo some changed text and some new > file
So now we have a tree with a file that contains one word altered.
Here is a comparison of git-diff with and without the --color-words
option:
![git-diff file]()
![git-diff --color-words file]()