git config user name email 2018-07-18 09:08

Use following command to add user name and email.

$ git config --global "John Doe"
$ git config --global

After execute the commands you can find the config in ~/.gitconfig file.

The content of ~/.gitconfig file is here.

    name = John Doe
    email =

You can also edit ~/.gitconfig file directly to config user name and email.