DEV Community

Cover image for Git user config
struggzard
struggzard

Posted on

Git user config

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)

Collapse
 
marcomoscatelli profile image
Marco Moscatelli

Short but good mate!