Top community members
All Wiki Articles Create Wiki Article

Welcome to Dirask IT community! ❤ 💻
We are community of people that helps each other.

If you are beginner in IT field, you are more then welcome to ask questions, it will help you to learn faster. We are here to help you.

We are always beginner in something, we just need to remember it along the way.

there are no wrong questions - Ask Question

Git - how to set username and email?

0 contributions
2 points

1. Overview

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

  1. Open command line (eg git bash)
  2. Set your username:
    git config --global user.name "FIRST_NAME LAST_NAME"
  3. Set your email address:
    git config --global user.email "OUR_NAME@example.com"
  4. Verify your configuration by showing username and email
    # show username
    git config user.name
    # show email
    git config user.email

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

  1. Open command line (eg git bash) and change directory into specific repository
  2. Set your username:
    git config user.name "FIRST_NAME LAST_NAME"
  3. Set your username:
    git config user.email "OUR_NAME@example.com"
  4. Verify your configuration by showing username and email
    # show username
    git config user.name
    # show email
    git config user.email

Merged questions

  1. How to change username and email in git only for single local repository?

References

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

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more