Languages
[Edit]
EN

Git - how to set username and email?

2 points
Created by:
Emrys-Li
580

1. Overview

Edit

Usually we configure global username and email address after installing Git.

We can also set configuration for single specific repository.

In this post we cover both configurations:

  1. global (all repositories)
  2. single repository

Git configuration works the same under Windows, Linux and macOS.

2. Git - set global username and email configuration

Edit
  1. Open command line (eg git bash)
  2. Set your username:
  3. Set your email address:
  4. Verify your configuration by showing username and email

3. Git - set username and email configuration for single repository

Edit
  1. Open command line (eg git bash) and change directory into specific repository
  2. Set your username:
  3. Set your email address:
  4. Verify your configuration by showing username and email

 

References

Edit
  1. Git config - Docs
  2. Getting Started - First-Time Git Setup
  3. Github - Setting your commit email addres

Alternative titles

  1. How to change username and email in git only for single local repository?
  2. Git - how to set user name and email?
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Git

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join