How to Configure the Installed Git Version

December 16, 2022 / How-to Guide

This article will explain how to configure the installed Git version. After confirming the Git version, you should configure Git so that the messages you generate contain the right information and help you in building software projects.

Let us follow the steps:

  1. To configure the installed Git version, the git config command is used. You should offer your name and email address as Git embeds the data in each commit you make. Follow the below command:
    git config –global user.name “Your Name”
    git config –global user.email [email protected]
  2. To display the configuration items follow the command:
    git config –list
    Output
    user.name=Your Name
    [email protected]
  3. Information you enter is stored in your Git configuration file, which you can edit manually with a text editor. This example uses vi:
    vi ~/.gitconfig
    ~/.gitconfig contents
    [user]
    name = Your Name
    email = [email protected]
  4. Press Esc :wq! then ENTER to exit the vi text editor.
  5. Although there are many more options available, these are the two that are absolutely necessary. You’ll probably get warnings when you commit to Git if you omit this step. You will then need to update the commits you made with the right information, which adds to your workload.

This way you will have Git installed and will be ready to use on your system. Hope you liked our article!

Spread the love