201k views
2 votes
How to set git global username and email

1 Answer

3 votes

Final answer:

To set the global username and email for Git, you can use the git config command with the --global option followed by your desired username and email.

Step-by-step explanation:

To set the global username and email for Git, you can use the following commands:

Open your terminal or command prompt.

Enter the following commands:

git config --global user.name "Your Username"

git config --global user.email "Your Email"

Replace "Your Username" with your desired username and "Your Email" with your desired email address.

Press Enter to execute the commands.

Your global username and email will be set. You can verify this by using the command git config --global --list, which will display the configured values.

User Alexander Guz
by
7.4k points