Git is a source code management (scm) software or to be more precise distributed version-control system (vcs) which is most widely used. It was conceived by Linus Torvalds, who is considered to be the creator and principal developer of Linux Kernal.
A developer should know how to use version control system such as Git to manage their source code. Github is a free repository of open source software which is publicly available.
In this blog we will see how to install Git version control system locally on your computer. This is used to check in or check out source code from Github.
Lets get started:
Step 1 – Download the installer
You can download the installer from the official Git-scm website.
Click on Windows to download the installer for Windows. The file name would be something like Git-2.25.1-64-bit.exe and file size would be around 45.5 MB.
Step 2 – Run the installer
The installation process is a standard windows installation process. Double click on the downloaded installer file to start the installation process.
Click on next to continue.
Step 3 – Select destination folder
Now you will be asked to specify the destination folder where Git will be installed. I leave it as default. It makes no difference if you install it at some other location.
Click next to continue
Step 4 – Select Components folder
Now you can select the components that will be installed. You can accept the default but normally I select the Additional Icons and uncheck Windows explorer integration. If you leave Windows explorer integration checked, you will see git option when you right click in any folder to initialize git. I find this irritating and I normally initialize git repository using the git init command in the terminal.
Click next to continue.
Step 5 – Select Start menu folder
I accept the default and click next to continue.
What it will do is that it will place the Git shortcut in the start menu folder so that it will be available from the start menu. Start menu folder is at C:\ProgramData\Microsoft\Windows\Start Menu\Programs
Step 6 – Choosing default editor
You need a text editor to edit the git config files. By default Vim editor is provided for windows. You can accept the default or select from the drop down list. I like to use Sublime text as my text editor. Some people like to use Notepad++ or Visual Studio Code.
If you have installed sublime text or notepad++ or visual studio code, select it from the drop down list.
If you use some other editor, you can specify executable path by selecting the last option “Select other editor as
Git’s default editor”.
I don’t normally install Sublime text, but download the portable version which is a zip file. Extract the zip in a folder and create a short cut for the executable (right click on sublime_text.exe, send to -> Desktop (create shortcut)).
I do the same for Visual studio code. I dont install it, but download the zip file, extract it and create a shortcut for the executable.
This trick is handy when you dont have admin rights to install on the system.
click next to continue.
Step 7 – Adjust path environment
Here we choose how we use git from command line. Leave it as it is for windows and click next to continue.
Step 8 – Choose SSH executable
This allows you to access remote servers using SSH protocol. Leave the default which is Use OpenSSH. But lets not complicate things and click on next to continue.
Step 9 – Choose HTTPS transport backend
HTTPS transport backend is how Git validates HTTPS connections. Leave the default and click next to continue.
Step 10 – Configuring the line ending conversions
Leave this as default and click next
Step 11 – Configuring the terminal emulator
Choose Use Window’s default console window and click next.
Step 12 – Configuring extra options
Uncheck all the options and click Install to continue
Step 13 – Installation begins
Installation will begin, wait for the process to complete.
When the installation completes, you will see the below screen, click next to continue.
You might see release notes page open in the browser.
That’s it Git is installed.
Step 14 – Check Git version
Open powershell or command prompt and enter the following command to check the version of installed Git.
That’s it, Git scm is installed. Thank’s for visiting my blog.