git config --global user.name 'Alice Smith'

Category: Git - Core

git config --global user.name 'Alice Smith'

Set your global Git name

Writes the name attached to all your commits into ~/.gitconfig, so every repository on this machine uses it unless overridden locally. Git records this name in every commit you make. It is one half of the identity setup, along with user.email.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.