1) How to set your Git username and email

git config --global user.name "codinko"
git config --global user.email "codinko@emailcom"

Note that "--global" is optional.When you give this, 
then this is your “global” Git username. 
You can also have a different username on a per-project basis.

2) How to show your Git username

There are at least three ways to show your Git username:

  1. The git config command
  2. The git config --list command
  3. Looking in your Git configuration file

1) The `git config` command

Here’s the git config command:

git config user.name

which in my case returns:

Super Man

2) The `git config –list` command

Another way to show your Git username is with this git configcommand:

git config --list

which returns this output:

user.name=Super Man

3) References: