On Thu, Jan 16, 2025 at 7:30 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > Subject: [PATCH] gitcli: document that command line trumps configuration > > We centrally explain that "--no-whatever" is the way to countermand > the "--whatever" option. Explain that a configured default can be > overridden by the corresponding command line option, too. > > Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> > --- > diff --git c/Documentation/gitcli.txt w/Documentation/gitcli.txt > @@ -161,6 +161,20 @@ can use `--no-track` to override that behaviour. The same goes for `--color` > +Options trump configuration > +~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +When there is a configuration variable and a command line option > +that tweaks the behaviour of the same aspect of a Git command, > +the command line option overrides the configuration variable. > + > +For example, the `user.signingKey` configuration variable is used to > +specify the default key used by the `git tag -s` command to create a > +signed tag. By giving the `-u <key-id>` option to `git tag`, which > +specif es the key used to sign a tag, the key specified by the `-u` s/specif es/specifies/ > +option on the command line is used, instead of the configured > +`user.signingKey`.