The config include mechanism doesn't allow for overwriting
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Oct 22, 2012, 15:55 UTC
- Message-ID
- <CACBZZX4cu9XuS5AtduWrNeXNUeZ4rqDUzRdmyz2b3cXtmo1nqQ@mail.gmail.com>
I was hoping to write something like this:
[user]
name = Luser
email = some-default@example.com
[include]
path = ~/.gitconfig.d/user-emailWhere that file would contain:
[user]
email = local-email@example.comBut when you do that git prints:
$ git config --get user.email
some-default@example.com
error: More than one value for the key user.email: local-email@example.comI couldn't find information in either the commt that introduced the feature or the documentation explaining whether this was the intent or not.
I think config inclusion is much less useful when you can't clobber previously assigned values.