Skip to main content

Setting Up User Info in Git

After installing Git, it's important to configure your user information. This information is used to track who made changes in a project. In this tutorial, we'll guide you through the process of setting up your Git user information.

Step 1: Open a Terminal

First, open a terminal on your system. If you're on Windows, you can use Git Bash which was installed with Git.

Step 2: Set Your Username

To set your Git username, use the git config command followed by --global user.name, and then your username in quotes. For example:

git config --global user.name "Your Name"

Replace "Your Name" with your actual name. This name will be attached to the commits you make.

Step 3: Set Your Email Address

Similarly, to set your email address, use the git config command followed by --global user.email, and then your email address in quotes. For example:

git config --global user.email "yourname@example.com"

Replace yourname@example.com with your actual email address. This email will be attached to the commits you make.

Step 4: Verify Your Configuration

You can check your configuration settings by using the git config --list command. This will display a list of all settings. Your username and email should be listed as user.name and user.email respectively.

git config --list

Conclusion

Congratulations! You've successfully configured your Git user information. This information will be used to track who made changes in your projects. Remember, you can change these settings at any time by using the git config command again. In the next parts of this tutorial, you'll learn more about using Git in your software development projects.