Git user configuration is divided into global configuration and project configuration
-
Global configuration
Use the following command to configure
git config --global user.name "yourusername" git config --global user.email "youremail"
The configuration is stored in the [user] node of the ~/.gitconfig file
-
Project configuration
Use the following command to configure in the root directory of the current git project
git config user.name "yourusername" git config user.email "youremail"
The configuration is stored in the [user] node of the /project-root/.git/config file