Repository-specific username/email configuration

You set up your repository. You cloned the repository and made some changes. You commit your changes and get the error – Make sure you configure your ‘user.name’ and ‘user.email’ it git

Make sure you configure your 'user.name' and 'user.email' it git

When working with Git as a source control management tool, you need to have defined the user name and email config value when checking in code. These values identify the user in commits. If you don’t have these configured, you’ll see a message – Make sure you configure your ‘user.name’ and ‘user.email’ it git

The username/email configuration can be set globally or at the project level.

To set your global username/email configuration:

  1. Open the terminal command line.
  2. Set your username: git config ––global user.name “<your name>”
  3. Set your email address: git config ––global user.email “youremail@example.com”

To set repository-specific username/email configuration:

  1. From the command line, change into the repository directory.
  2. Set your username: git config user.name  “<your name>”
  3. Set your email address: git config user.email “youremail@example.com”

Verify your configuration by displaying your configuration value –

git config ––get user.email
git config ––get user.name

Leave a Reply

Your email address will not be published.