Saturday, December 31, 2016

Git global settings on MacOS

For MacOS Sierra, we can configure user name and user email as global settings for a user via terminal.

Below is an example to set user name and user gmail for a user.

git config --global user.name "usera"
git config --global user.email "usera@gmail.com"

The settings will be written to ~/.gitconfig file.  After the commands, all git repositories by default will have user name of "usera" and user email as "usera@gmail.com.

No comments:

Post a Comment