Quick tip, especially if you use GitHub with Gravatar so a little profile picture will show up on GitHub you likely need to set your Author and Email for Git. So instead of falling back to your system username and machine name for an email address (at least on the Mac), and your account's long name for author name, Git will use the correct information and your gravatar will show up in GitHub (minimally just match your email with your Gravatar account).

Run the following commands:

git config --global user.name 'Your Name'
git config --global user.email ben@domain.com

This will add entries to your ~/.gitconfig file under the [User] section.

Thats it. See me on GitHub here: http://github.com/unilogic

Thanks Tim for the correct way of doing this.
Resource: http://cheat.errtheblog.com/s/git

1 Response to “Tip of the Day: Set Git Author and Email [Updated]”

  1. Tim Carey-Smith Says:
    You realise that git-config is there for a reason. http://cheat.errtheblog.com/s/git has some info about this. You should use --global as mentioned to make sure it is enabled across all your repos. And remember you can then override for a single repo as well!

Leave a Reply