GitCheatSheet.org logo
Home / How To

Show the user name configured for a specific location (e.g. worktree, local, global, system)

# Worktree
git config --worktree user.name

# Local (current repository)
git config --local user.name

# Global
git config --global user.name

# System
git config --system user.name

The precedence is: worktree, local, global, system.