We will set up a simple configuration to add the common information for each commit. Here username and email have been set up.
Case 1 (Globally): If you would like to set up a user name and email globally, this user name and email would be added to the entire git repository in your machine for each commit. Then follow the below command.
- Open cmd/Git Bash
git --global user.name "Roman Sarker"git config --global user.email "roman@yahoo.com"
Case 2 (Specific Project): If you want to set up a username and email for a particular project. Then follow the below command. Here just remote the hyphen (--) .
- Open Git Bash
- Go to the Project Folder in Git Bash
- Initialize the project
- Set username
- Set email
Commands -
git initgit config user.name "Roman Sarker"git config user.email "roman@yahoo.com"
Done. Now you can see the username and email in every commit log.
0 Comments