Git: Setup Name and Email

By Xah Lee. Date: . Last updated: .

Set Up Name and Email Info

You need to setup a default name and email. Else, git won't let you commit.

Everytime you commit, your user name and email is in part of the commit info. This allows git to show who did what, when working in a team. That's why user name and email are required. (you can use random name and email if you want)

Type the following in a terminal.

# set up default name and email
git config --global "Joe Blow"
git config --global ""

this creates a file at ~/.gitconfig

You can run these commands again to change. (you can also edit the file directly.)


git FAQ