Do you use different user names and/or email for your github projects, work projects, private personal projects?
Then you use git config
a lot.
With git-user-config
you can save these different users globally and configure a new repo with a single command using the user record id.
No more misspelled email addresses and user names...
npm install -g git-user-config
git-user-config --add
The follow instructions
Add new user record
id: user1
name: user 1
email: [email protected]
record saved
git-user-config --set user1
This will call git config
to set user.name and user.email
$ git config -l | grep user
user.name=user 1
[email protected]
git-user-config --list
{
"user1": {
"name": "user 1",
"email": "[email protected]"
},
"user2": {
"name": "user 2",
"email": "[email protected]"
}
}
git-user-config --remove user1