Git: Set local user.name and user.email different for each repo

前端 未结 2 864
执念已碎
执念已碎 2020-12-23 02:46

I\'m currently working on 2 projects, which expect that I configure my local username and email with different data when I push to them.

for that I\'m updaing my con

2条回答
  •  一生所求
    2020-12-23 03:16

    For just one repo:

    git config user.name "Your Name Here"
    git config user.email your@email.com
    

    For (global) default email (which is configured in your ~/.gitconfig):

    git config --global user.name "Your Name Here"
    git config --global user.email your@email.com
    

提交回复
热议问题