Possible Duplicate:
Is it possible to include a file in your .gitconfig
With bash and zsh I can source subfiles in order to better organize my config.
Can I do something similar with .gitconfig?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
(March 2012) It looks like this is finally going to be possible soon — git 1.7.10 is going to support this syntax in
.gitconfig:See here for a detailed description of the git change and its edge cases.
By the way, a couple of subtleties worth pointing out:
Path expansion, e.g.
~or$HOME, does not appear to be supported.If a relative path is specified, then it is relative to the .gitconfig file that has the
[include]statement. This works correctly even across chained includes — e.g.~/.gitconfigcan have:and
subdir/gitconfigcan have:… which will cause
subdir/nested_subdir/gitconfigto be loaded.If git can’t find the target file, it silently ignores the error. This appears to be by design.