Understanding Git(Part 2) - Installing and Configuring git.

Sachinjose
2 min readJun 11, 2021

Hi All, welcome to the second part of our git series. Let’s dive into how we can install and use git locally.

Installation and Setup

Installing Git

Git can be installed in Windows, Linux, and Mac Os. In this blog, we will look into installing in windows.

Windows

Download and install Git for windows. It’s recommended that you stick with the defaults selected during the installation.

Once installed, you’ll be able to use Git from the command prompt or PowerShell.

After installing, try to run git from the command prompt or Powershell.

git --version

Add a git Bash in the windows terminal and include the below values under the windows terminal settings list.

{
"guid": "{abc00000-0000-0000-0000-000000000000}",
"name": "Git-Bash",
"commandline": "%PROGRAMFILES%\\Git\\bin\\bash.exe",
"icon": "%PROGRAMFILES%\\Git\\mingw64\\share\\git\\git-for-windows.ico",
"startingDirectory" : "~"
},

Configuration Setup

User details

When you start working, the git needs to capture who is performing the changes. To achieve this, we have to configure our git.

git config --global user.name "User Name"
git config --global user.email "email"

Changing Editor

You can also change the default editor.

git config --global core.editor "notepad"

If you want to set up any editor of your choice, you can include the editor's execution file.

## Notepad++ 
git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe'
## VS code
git config --global core.editor "code --wait"

To print the details of the entire configuration setup of the git.

git config --list 
(or)
git config -l

We have set up our git; in upcoming parts, we will take you deeper into git….Cheers!

--

--