Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not as fancy, but if you want halfway reasonable word-level diffs with just standard issue git, this is often good enough:

  git diff --color-words --word-diff-regex='\w+|.'



How do I enable this by default (in .gitconfig)?


Try this

git config --global diff.colorWords true

git config --global diff.wordRegex '\w+|.'




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: