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@domain.com
git commit --amend --reset-author

This will set “First Last” and email@domain.com 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@domain.com>"

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@domain.com
[ git  linux  ]
Using Gerrit with MySQL
Using Gerrit for better collaboration on git projects
Colorize git output
Run PHP unit tests automatically using git hooks