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:
- 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]
- To display the configuration items follow the command:
git config –list
- Information you enter is stored in your Git configuration file, which you can edit manually with a text editor. This example uses vi:
name = Your Name
email = [email protected]
- Press Esc :wq! then ENTER to exit the vi text editor.
- 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!