public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* git init with specified user.email
@ 2026-01-08 17:21 David Miguel Susano Pinto
  2026-01-08 23:22 ` brian m. carlson
  0 siblings, 1 reply; 2+ messages in thread
From: David Miguel Susano Pinto @ 2026-01-08 17:21 UTC (permalink / raw)
  To: git

git checkout has a --config option so one can do:

    git clone --config 'user.email=email-for-this-clone' ...

which I find nice to setup as git alias:

    clone-work = clone --config 'user.email=my-work-email'

(while leaving the default clone for my personal projects; or an alias
for clone-personal with the work email as the clone default).

I would like something similar for git init.  However, git init does not
have a `--config` option.  I tried to use

    git -c 'user.email=my-work-email' init

but that's not working (I'm guessing it only picks up configurations
mentioned on the man page for git-init).

I am currently working around this with a template for work but would
prefer to init with `-c` (or similar) or at least understand why this is
not possible.

--
David

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-08 23:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08 17:21 git init with specified user.email David Miguel Susano Pinto
2026-01-08 23:22 ` brian m. carlson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox