Posted almost 6 years ago. Visible to the public.

Git: Diff per word or character

By default git diff highlights whole lines as changes.

To diff on a word-by-word basis you can say:

Copy
git diff --color-words

To diff on a character-by-character basis you can say:

Copy
git diff --color-words=.

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Owner of this card:

Avatar
Henning Koch
Last edit:
almost 6 years ago
Keywords:
added, removed, red, green
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more