javailike javailike - 7 months ago 33
Git Question

How to manage multiple projects in git with different emails?

I have a project in GitHub working with git config:

git config --global = ""
git config --global = "abc"

Now I need to host another project in git lab, with different email id:

my email account is ""

Do I need to configure anything in git bash, what is the steps I need to do?

If I tried using the same account, I afraid some issue occur

Do I need to change anything?


For your new repo, all you need to do is, in the repo folder, to do:

git config = ""

The local configuration will override the global one, and your commits will have the right email.

Note: this has nothing to do with the authentication on GitLab.