Kurt Peek Kurt Peek - 5 months ago 36
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?


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.