3 ms·
Surely far from being as elaborate as the linked tool, but I use the following git command a few dozen times daily: git diff --word-diff=color --word-diff-re
by tlamponi 5y ago
Surely far from being as elaborate as the linked tool, but I use the following git command a few dozen times daily:
git diff --word-diff=color --word-diff-regex='\w+'
I added two aliases to my .gitconfig, one for diff and one for show:
[alias]
word-show = show --word-diff=color --word-diff-regex='\\w+'
word-diff = diff --word-diff=color --word-diff-regex='\\w+'
Those small things improved development and reviewing a lot for me!
If stuff moved around or got it's indentation changed I either add `--color-moved` and/or `-w` (ignore whitespace changes) flags to filter out extra noise.
Sometimes I need to use another regex though, e.g. a simple dot `.` for match all with no greedy +
- fragmede 5y agoA tiny bit of shell golf - I have similar aliased to wdiff (or even wd if you're especially parsimonious).