Setup git username for a single repository

Open Terminal and use the following commands to set Git username and email address for your current git repository. Set a Git username: Set a Git email:

Setup git username for all repositories

Use –global option to set username and email globally on system. Open a terminal and use the following commands to set Git username and email address for all the git repository on the system. Set a Git username: Set a Git email: