DEV Community

Cover image for Git user config
struggzard
struggzard

Posted on

4 2

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!

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay