We need to consider below 2 steps for configuring the Git before using it.
- Git Client
- Configuration
Git Client
First we need to install the Git Client. Below is the different kind of clients.
- Command line tools like Git CLI (link to install Git)
- GUI tool like Visual Studio Code
Configuration
We need to set the username and email id before using the Git. Userid is required so that we know who makes changes to the code and email id is required to send the notification to the user.
we run the following commands with the use of our own information:
$ gitconfig—globaluser.name“myUsernNamr“
$ gitconfig—globaluser.email“myEmalID@example.com“
This will set the userid and email globally.
Note: We can set a project-specific name and email by running the git config
command without the --global
option.