If you just installed git in your computer you probably got a message telling you that your name and e-mail haven’t been configured and suggesting you to change them the first time you commit:
1
2
3
git config --global user.name "First Last"
git config --global user.email [email protected]
git commit --amend --reset-author
This will set “First Last” and [email protected] as your default name and email for any git repository you work on in that computer. This may be something you don’t want because probably you want to have different identities in different computers. One thing you can do is amend your commits with an alternate identity you want to use:
1
git commit --amend --author="First Last <[email protected]>"
If you will constantly be working on this repository this will become annoying really fast, so instead you can set your identity for a specific repository by adding this to your .git/config file:
1
2
3
[user]
name = First Last
email = [email protected]
git
linux
]