Hey Tushar,

When you run `git config --global user.email a...@xyz.com` it writes
out this setting in ~/.gitconfig which is then considered to be
"global" ie. this same email will be used for every repo, but ...

You can always override this. Let's say there is a repo named "foo" in
which you want the email "x...@abc.com", then you go inside that folder
and type `git config user.email x...@abc.com`. Note: the option
`--global` is skipped here. This creates a file `.gitconfig` in the
folder "foo" and now whenever you commit, the .gitconfig file inside
the repo will get the first preference and then the global
~/.gitconfig.

This will work for you assuming that you have different repos for your
company and for your open source work. Will this solve your problem?

Regards,
Pranit Bauva

Reply via email to