Pages

Tuesday, March 14, 2017

Setting Username and email address in GIT

Setting Username and email address in GIT

This post is about how to set User name and email address in GIT. Normally, If we try to push the code from linux system, and if Username and email address is not configured, then in the
"git log", we will be getting like, committed by 'root' at 'root@localhost'. So its mandatory to set username and email address in the  local GIT.

To Set Username in GIT,
git config user.name GitProgrammer
To Get / View the Username configured for the git repo,
 git config user.name
GitProgrammer 
To Set email address in GIT,
git config --global user.email "your_email@example.com"
 To get/view the email address for the git repo,
git config --global user.email
your_email@example.com
Reference:
https://help.github.com/articles/setting-your-username-in-git/
https://help.github.com/articles/setting-your-email-in-git/ 

No comments:

Post a Comment