Configure Git User Information On macOS:

To configure your Git user information on macOS, follow these steps:

$ git config --global user.name "John Doe"
$ git config --global user.email "john@example.com"

Don’t forget to change the user name and email to your desired values. This configuration is global for your Git installation.

If you’re using macOS and wish to store your password in the keychain, Git should automatically prompt you to store your credentials when needed.

On Windows:

To configure your Git user information on Windows, you can use the following commands:

  1. Navigate to the repository where you want to make the changes in your terminal.
  2. Execute git config --list to check the current username and email in your local repository.
  3. Change the username and email as desired, and you can choose whether to make it a global change or specific to the local repository:
git config [--global] user.name "Full Name"
git config [--global] user.email "email@address.com"

You can also edit the .git/config file manually on a per-repository basis if you prefer. This allows you to customize configuration settings for a specific repository.

By following these steps, you can easily configure your Git user information on macOS and Windows, ensuring that your commits are associated with the correct name and email address.

Leave A Comment