Walk through my git config
And now for something completely different, here's my workstations' ~/.gitconfig
, the global git config. So this is not for any particular repository; it's the overall settings.
[user] name = B. Stack email = bgstack15@gmail.com [credential] helper = cache --timeout=7200 [diff] color = auto [pull] rebase = false [http] emptyAuth = true [sendemail] smtpserver = server2.ipa.internal.com smtpserverport = 25
Section [user]
is of course my name and email.
Section [credential]
caches my password for 2 hours. That seems to be a good number.
Section [diff]
sets color to auto, so when not piping to something else, display pretty Christmas colors!
Section [pull]
. I don't remember why I have this, but probably to silence some warning or deprecation notice. Whatever.
Section [http]
is useful with kerberos. When a git remote of http://gitserver.ipa.internal.com
accepts kerberos authentication, it sends back a challenge to authenticate. Git needs emptyAuth=true or else it will never get around to submitting the user's kerberos ticket. This requires a newer version of Git than what CentOS 7 has.
Section [sendemail]
I barely use, but was for when I was trying to generate git emails. I only used it once or twice, and I didn't like the data leakage that happened, so I ended up not using it.
Conclusion
I started off of course, thinking that I wouldn't want to customize my tools because then I'd have to carry those everywhere I go. But over time, more and more settings are useful to me and I need them. So just like my .vimrc, my .gitconfig has grown.
What's in your git config?
References
for git 2.11 and higher, krberos auth https://docs.gitlab.com/ee/integration/kerberos_troubleshooting.html
Comments