Changing Git Account (User) in a Local Shell Environment
When you use two Git accounts on a single system and need to work against a remote repository as a specific account.
[01] Check Current Settings
Check all settings.
1
git config -l
- Sample output
Check specific settings (user name, user email).
1
2
git config user.name
git config user.email
- Sample output
[02] Change Settings
Change the user account and email.
1
2
git config --global user.name $(username)
git config --global user.email $(useremail)
- Sample output