Git config and installation

How to install and configure git on your local system?

We can operate Git by commands in Command Prompt or Powershell in Windows and terminal apps in Linux. By the use of commands, we can know the version of installed Git in our system. It is necessary for a developer that he must know the CLI commands of Git.

How to install Git?

Go to URL https://git-scm.com/downloads and follow the step-by-step instructions to install git on your system.

Git Configuration

You can configure git in your local system by running commands. If you have Windows, then open Command Prompt otherwise search Terminal in your application list.

  1. How to know the version and set your name and email address in Git?

Open Command Prompt or Window Powershell in your Windows operating system and type git --version then press Enter.

We have to type git config --get user.name to find the username of installed git.

You can also change the user name of the installed git.

git config global user.name "newusername"

If you want to see the user email applied in git.

git config --git user.email

and you can also change the user email address by giving the command git config --global user.email "email@com" .

  1. How do I set VS Code as default editor in git?

Open the Command Prompt in Windows and go to the command line.

Type git config --global core.editor "code --w" and press Enter.

and then git config --global -e

  1. How to check your configuration in git?

    To see the configuration of git you have to type git config in your command line and press enter.

    Now you can see your git configuration.

Did you find this article valuable?

Support WebIndia by becoming a sponsor. Any amount is appreciated!