I used the solution here to change tab size in git diff output. That works fine with git diff.
I have these settings in my .gitconfig:
[core]
whitespace = tabsize=4,indent-with-non-tab
pager = less -FSRX -x4
But those settings seems does not affect on git add -p.
How to set tab size for hunks in git add -p command?
core.pager settings doesn't affect git add -p command because git add -p doesn't go through less/pager. To change hunks tabs size you need change the tabs size of your terminal. Found solution here. Just added in .bashrc:
env TERM=linux setterm -regtabs 4
That settings works fine in xterm terminals. For other terminal types check manuals for proper solution.
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