Back to blog
Apr 29, 2024
2 min read

Configure and for Git

Set Git and using git config --global for global settings or git config for local.

Terminal on Ubuntu Linux

Photo by Yancy Min on Unsplash

Git is a distributed version control system used for tracking changes in source code. Configuring and ` is essential because it identifies the author of each commit. Here’s a simple guide to set them up:

Setting Global Configuration

To set your name and email globally, meaning it will apply to all repositories on your machine, use the following commands:

# Set the global user name
git config --global "Your Name"

# Set the global user email
git config --global ""

Setting Local Configuration

To set the configuration for a specific repository, navigate to the repository’s directory and use the following commands:

# Set the local user name
git config "Your Local Name"

# Set the local user email
git config ""

Checking the Configuration

To check the current global and local configurations, use these commands:

# Check global configurations
git config --global --list

# Check local configurations
git config --list


By following these steps, you can set up and confirm your Git configurations for and This will ensure that your commits are properly attributed to you.