Switch email and name for each Git repository

Sometimes, I would like to switch user.name and user.email of git configuration. For example, I have two GitHub account, for business and for private. When I push some commits to repositories through the same laptop, name and email must be configured correctly for appropriate repository. In this case, we should set up user configuration for each repository. We can use below commands. $ cd YOUR_REPOSITORY $ git config --local user.name "hogehoge" $ git config --local user....

May 22, 2021 · 1 min · waneal