git diff –> show changed part in the line

Use the --word-diff option for git diff

For example, git diff --word-diff=color:

git-diff-word-diff-color

and git diff --word-diff=plain:

git-diff-word-diff-plain

There’s also --word-diff-regex=<regex>

See git help diff for more info.

Leave a Comment