It's easy to configure git-diff to enable color-words by default.
How can I equally configure git-show
to use color-words
by default?
The only option I found so far was to use an alias:
[alias]
sh = show --color-words
ui" to "auto" as the first thing after you set " user.name/email " to introduce yourselves to Git. Now the variable defaults to " auto ". So you will see colors by default. Using Ubuntu in 2014, installed git and still had to run git config --global color.
git diff --color-words git diff also has a special mode for highlighting changes with much better granularity: ‐‐color-words . This mode tokenizes added and removed lines by whitespace and then diffs those. Now the output displays only the color-coded words that have changed.
If you've committed whitespace issues but haven't yet pushed upstream, you can run git rebase --whitespace=fix to have Git automatically fix whitespace issues as it's rewriting the patches.
You can use [color "command"]. Here is an example. You need to check what options "show" has.
[color "diff"]
frag = cyan
new = green
commit = yellow
[color "branch"]
current = green
[color "status"]
updated = green
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With