Skip to content
Related Articles

Related Articles

How to Install Git on Windows Using Chocolatey?

View Discussion
Improve Article
Save Article
  • Difficulty Level : Expert
  • Last Updated : 02 Jun, 2022

Git is a FOSS (Free and Open Source Software) that is used to for version control of any set of files, typically, the source code of software projects. It is distributed under the GPL-2.0-only license. Git was originally authored by Linus Torvalds, to aid in the development of the Linux OS. It was developed further and released on 7 April 2005.

Its main features are speed, data integrity, and support for distributed, non-linear workflows (thousands of parallel branches running on different systems).

What is Chocolatey?

Chocolatey is a package manager for Windows based on Nuget, initially released on 23 March 2011. It simplifies the process of installing and downloading software on Powershell. Fun fact: Chocolatey is a pun on the term ‘Chocolate Nougat’.

PackageManagement (formerly OneGet) was released by Microsoft in April 2014, with the objective to integrate package managers into PowerShell. It was pre-configured to browse the Chocolatey repository.

Chocolatey is licensed using the  Apache License 2.0.

Prerequisites

A Windows PC with a valid installation of Chocolatey

Procedure to install Git in Windows Using Chocolatey

Step 1: Open Powershell as an Administrator in Windows.

Open-Powershell-on-Windows

 

Step 2: Check if Chocolatey is installed, by typing the following in the Powershell Terminal:

choco

Check-if-chocolatey-is-already-installed

 

If the displayed output is not, as shown above, Chocolatey is not installed in the system.

Step 3: If Chocolatey is not installed, you can install it by typing the following in the Powershell Terminal.

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(‘https://community.chocolatey.org/install.ps1’))

Installation-of-chocolatey

 

Step 4: Type the following command in the Powershell Terminal to install git:

choco install git.install

install-git-using-chocolatey

 

Git-Successfully-installed

 

Step 5: Verify if git is installed successfully, by searching for git in Windows Search.

Verify-Installation-of-GIT

 

If you are able to find Git after searching for it, then the installation was successful.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!