Is it possible to have different Git configuration for different projects?

前端 未结 12 777
萌比男神i
萌比男神i 2020-12-02 03:44

.gitconfig is usually stored in the user.home directory.

I use a different identity to work on projects for Company A and something else fo

12条回答
  •  不知归路
    2020-12-02 04:15

    I am doing this for my email in the following way:

    git config --global alias.hobbyprofile 'config user.email "me@example.com"'
    

    Then when I clone a new work project, I have only to run git hobbyprofile and it will be configured to use that email.

提交回复
热议问题