hen we are using GIT, it’s advaisable to set username and e-mail so that we no need to set them everytime we use GIT to do changes. This post will show you on how to set username and e-mail for editing data with in git.
Check if there is any username and email set for your login to use GIT?
To know it we have to use git command or open ~/.gitconfig file.
Checking user name and password is set or not using git config command
git config user.name
git config user.email
○ → git config user.name
And for email
○ → git config user.email
or check in ~/.gitconfig file for information
grep -E 'name|email' ~/.gitconfig
How to set user name and e-mail for your login.
git config --global user.name "your user name"
git config --global user.email "Your e-mail"
git config --global user.name "John who"
git config --global user.email "email@example.com"
Again to check these settings are saved or not open ~/.gitconfig file and see the changes.
Latest posts by Surendra Anne (see all)
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018
- wget download a file to a directory in Linux/Unix - June 4, 2018
- GIT: How to compare two GIT branches? - June 3, 2018
- Online training on Linux Bash shell scripting - February 8, 2018