# 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.