Configure Git User & Email

To use Git, we need to configure our user name and email. We can configure them either globally or for each project. Here are the commands to do so.

Global Configuration:

git config --global user.name "Ramesh Thiruchelvam"
git config --global user.email "ramesh@limarktech.com"

Project Configuration:

git config user.name "Ramesh Thiruchelvam"
git config user.email "ramesh.thiruchelvam@gmail.com"

If we need to modify the author of a commit, we can use the following command:

git commit --amend --author="Ramesh Thiruchelvam <ramesh.thiruchelvam@gmail.com>"