From: "Tomáš Procházka" <tomas.prochazka5d@gmail.com>
To: git@vger.kernel.org
Cc: tomas.volf@showmax.com
Subject: Fwd: Q: use '-C' flag with 'git config --global'
Date: Mon, 6 Apr 2020 10:48:06 +0200 [thread overview]
Message-ID: <CA+Sgv42bOAaRBX99EpgpnSkGXFCWFpED7hwdwkWmPSOKuL1VBg@mail.gmail.com> (raw)
In-Reply-To: <CA+Sgv42V+xfoJVoFpPkWREXT0yuKZDeMDEGa3y8NDVU-4D1iYA@mail.gmail.com>
Hi,
I'm running into issue that if I run `git -C <pwd/to/showmax/project>
config --global user.email` I don't get expected email.
Expected: tomas.prochazka@showmax.com
Got: tomas.prochazka5d@gmail.com
My config contains a little catch:
~/.gitconfig
```
[user]
name = Tomáš Procházka
email = tomas.prochazka5d@gmail.com
[includeIf "gitdir:~/Workspace/Showmax/"]
path = ~/Workspace/Showmax/.gitconfig
```
~/Workspace/Showmax/.gitconfig
```
[user]
name = Tomáš Procházka
email = tomas.prochazka@showmax.com
```
I get correct email setting if I run command without `--global` flag.
But What I understand from the [`git-config`
docs](https://git-scm.com/docs/git-config#_description) if no flag is
passed the values are read from system, global and local.
If I run commands one by one, No returns the ~correct~ expected email:
~ $ git -C <pwd/to/showmax/project> config --system user.email
~ $ git -C <pwd/to/showmax/project> config --global user.email
tomas.prochazka5d@gmail.com
~ $ git -C <pwd/to/showmax/project> config --local user.email
Am I missing something?
Thanks for the answer.
Regards
Tomáš Procházka
next parent reply other threads:[~2020-04-06 8:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+Sgv42V+xfoJVoFpPkWREXT0yuKZDeMDEGa3y8NDVU-4D1iYA@mail.gmail.com>
2020-04-06 8:48 ` Tomáš Procházka [this message]
2020-04-06 13:05 ` Fwd: Q: use '-C' flag with 'git config --global' Jeff King
2020-04-06 18:01 ` Junio C Hamano
2020-04-06 18:05 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+Sgv42bOAaRBX99EpgpnSkGXFCWFpED7hwdwkWmPSOKuL1VBg@mail.gmail.com \
--to=tomas.prochazka5d@gmail.com \
--cc=git@vger.kernel.org \
--cc=tomas.volf@showmax.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).