When I use git-config to edit my .gitconfig file, it inserts tabs. Is there a way to make it insert spaces instead of tabs?
(The motivation is that when I hand-edit the file, I always insert spaces. Git's use of tabs makes the file inconsistent. Of course I could just use tabs myself, but that's just ridiculous.)
gitconfig is used to store a per-user configuration as fallback values for the . git/config file. The file /etc/gitconfig can be used to store a system-wide default configuration. The configuration variables are used by both the Git plumbing and the porcelains.
# There are 3 levels of git config; project, global and system.
Creating your global gitconfig file:From the Terminal, execute git config --global -e which will open up a text editor with the contents of the file (only if it has some content already, else it would be empty). You can then update the file with your custom configurations.
This was answered above in a comment by @Wolf, but to reiterate: this is hard-coded in Git's store_write_pair
implementation, which was most recently rewritten in 2007 and originally implemented in 2005.
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