How to Install Git on Windows Using Chocolatey?

Installing Git on Windows can be a simple process, especially with the help of package managers like Chocolatey. Chocolatey is a package manager for Windows that automates the installation, upgrade, and uninstallation of software. This article will guide you through the steps to install Git on Windows using Chocolatey.

Why Use Chocolatey to Install Git?

Chocolatey simplifies the process of installing software on Windows by automating the manual steps involved. With Chocolatey, you can install Git and its dependencies with just a single command. This not only saves time but also ensures that you have the latest version of Git installed on your system.

Steps to Install Git Using Chocolatey

Step 1: Open Powershell as an Administrator in Windows.

 

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

choco

 

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’))

 

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

choco install git.install

 

 

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

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