Kurt Peek Kurt Peek - 1 year ago 110
Git Question

How to configure Git when using it in different settings

Till now I've used Git with GitHub personally, but I'm starting to use it professionally with GitLab using a different (company) e-mail address.

In https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html it is explained how to run the

git config --global
commands when setting it up. I assume this would overwrite my 'personal' settings. Is there away to create two 'instances' of Git, one for personal and one for professional use?

Answer Source

Checkout the repository, and use git config without --global switch.

The default switch is --local

That will set new email for this particular repository and will keep your global settings.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download