git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git init with specified user.email

From
DPDavid Miguel Susano Pinto <carandraug@gmail.com>
Date
Jan 8, 2026, 17:21 UTC
Message-ID
<875x9cvx44.fsf@word>
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

Next: brian m. carlson
Message 1 of 2 in “git init with specified user.email”
  1. David Miguel Susano PintoJan 8, 2026
  2. brian m. carlsonJan 8, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.