Re: [QUESTION] How to add new configuration variable
- From
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
- Date
- Sep 17, 2021, 13:43 UTC
- Message-ID
- <20210917134318.scdqa6k4swzgo5k2@meerkat.local>
- In-Reply-To
- <9f3cc3f0-36db-f7e5-de1d-2c8c9f246884@gmail.com>
On Fri, Sep 17, 2021 at 05:44:42PM +0700, Bagas Sanjaya wrote:
Show 5 quoted lines
> Supposed that I'm writing git-foobar script ("git-foobar.sh"), which takes
> configuration variable "foobar.something" (string type).
>
> How can I add that configuration variable so that it can be used by the
> script?You can just add it. :) Git doesn't complain when it finds configuration parameters it doesn't know anything about, it just ignores them.
E.g. in your .gitconfig or individual repository .git/config:
[foobar]
something = yourvalue-K