Command

Git Set User Name Command

The Git command to set user name is git config --global user.name "Your Name".

Quick Answer

Command
git config --global user.name "Your Name"
GitCommand

Set User Name

Type this command
git config --global user.name "Your Name"

Sets the name recorded on your commits.

Learn More

How to set user name in Git

  1. Open the terminal or command interface for Git.
  2. Type git config --global user.name "Your Name", replace any placeholders, and run it.

Git Set User Name Command

Run git config --global user.name "Your Name".

Related Commands

Frequently asked questions

What is the Git command to set user name?

Run git config --global user.name "Your Name".

Where do I type this Git command?

Type it in the terminal or command-line interface used by Git.

Does this Git command work on Mac and Windows?

Yes. The command text is the same on both platforms when the tool is installed.

Official source · How we verify