As a person who jumps from work to a personal git-based project I sometimes need to take eye on git user configuration.
Configuration scopes
Git have configuration in following scopes:
-
system - default configuration which applied for all users/projects (e.g.:
/etc/gitconfig). -
global - configuration which applied for all projects, saved at user home (e.g.:
~/.gitconfig). -
project - available for project only, saved in the project directory
.git/config.
User config commands
Here few handy git commands related to user config.
| command line | explanation |
|---|---|
git config user.name |
displays current user name |
git config user.email |
display current user email |
git config user.name <user full name> |
set given user name |
git config user.email <email> |
set given user email |
Top comments (1)
Short but good mate!