DEV Community

Cover image for Git user config

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 displays current user name
git config display current user email
git config <user full name> set given user name
git config <email> set given user email

Top comments (1)

marcomoscatelli profile image
Marco Moscatelli

Short but good mate!