Install Git on Windows 11 | Best Version Control System
In this guide, you will learn how to Install Git on Windows 11. Git is the most commonly used version control system. It meticulously tracks the changes you make to files, providing a comprehensive record of all modifications. This allows you to revert to specific versions as needed.
Git also streamlines collaboration, enabling changes from multiple contributors to be seamlessly merged into a single source. Regardless of whether you’re working on a solo project or collaborating within a team, Git proves to be an invaluable tool. Learning to Install Git on Windows 11 is a foundational skill for any developer.
You can now proceed to the guide steps below on the Orcacore website to complete Git Setup on Windows 11.
To complete this guide, you must log in to your Windows Client and follow the steps below. In this guide, you will learn to use the Chocolatey package manager to install Git.
1. Install Chocolatey For Git Setup on Windows 11
Chocolatey is a command-line package manager for the Windows operating system based on the NuGet package manager. Chocolatey manages its own package feed; however, you can set up your own local repository for the enterprise environment to control the package’s source for installation.
If you are familiar with Linux or macOS environments, Chocolatey is similar to Apt and Homebrew, respectively. To install Chocolatey, run your PowerShell as an administrator and run the following command:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
When you are finished, close the PowerShell and open it again.
2. Installing Git with Choco
At this point, from your PowerShell run the following command to set up Git on Windows 11:
choco install -y git
When your installation is completed, close the PowerShell to apply the changes.
To verify your Git installation, you can check its version from the PowerShell:
git --version

3. Configure Git on Windows 11
Before you start to use Git in a project, you need to configure it to your username and email address.
To do this, from your PowerShell run the following commands with your desired username and email address:
# git config --global user.name your_username
# git config --global user.email your_email@example.com
To check the configuration settings for your repository, you can run the following command:
git config --global --list
**Example Output**
user.name=orca
user.email=orca@orcacore.com
Initialize a Repository with Git
If you have a project folder that is not currently using Git version control, open the folder, right-click on an empty place on the folder and choose the menu item “Git Bash Here”. It will open the Windows Git Bash terminal in your current working directory.
From the terminal that opened for you, run the following command to initialize the new project:
git init
**Output**
$ git init
Initialized empty Git repository in C:/Users/Administrator/Downloads/Git Repo/.git/
The git init
command is the command that allows us to create a local repository in Windows 11. The init command creates the .git subfolder (inside your current working directory) that contains all of the folders and configuration files of the local repository.
That’s it, you are done.
Conclusion
The purpose of using Git on Windows 11 is to manage and track changes in code or files, collaborate with others on projects, and maintain version control in software development. It allows developers to easily manage code repositories, revert changes, and integrate with platforms like GitHub or GitLab. At this point, you have learned to complete Git Setup on Windows 11. Mastering how to Install Git on Windows 11 is crucial for modern software development workflows.
Hope you enjoy it. Please subscribe to us on Facebook and YouTube.
You may be like these articles too:
How To Install Dig on Windows 10
How To Check RAM Speed on Windows 11
Install MAMP on Windows 11
Set up VirtualBox on Windows 10/11
Alternative Methods to Install Git on Windows 11
While Chocolatey provides a convenient way to Install Git on Windows 11, there are alternative methods that you can use. These methods offer different approaches and might be more suitable depending on your preferences and system configuration. Here are two such alternatives:
1. Using the Git for Windows Installer
This is the most straightforward method for many users. It involves downloading an executable installer from the official Git website and following the on-screen instructions.
Explanation:
The Git for Windows installer provides a graphical user interface (GUI) that simplifies the installation process. It guides you through various configuration options, such as choosing the components to install, setting the default text editor, and configuring the PATH environment variable. This method is especially useful for users who prefer a visual installation process rather than using the command line.
Steps:
-
Download the Installer: Go to the official Git for Windows website: https://git-scm.com/download/win and download the appropriate installer for your system (32-bit or 64-bit). The website should automatically detect your system architecture.
-
Run the Installer: Double-click the downloaded executable file to start the installation process.
-
Follow the Instructions: The installer will guide you through a series of configuration options. Here are some key settings to consider:
- Choosing Components: Select the components you want to install. The default options are usually sufficient for most users. Consider adding "Git GUI Here" and "Git Bash Here" for convenient access to Git from the file explorer context menu.
- Adjusting Your PATH Environment: Choose how you want to use Git from the command line. The recommended option is "Git from the command line and also from 3rd-party software". This will add Git to your PATH environment variable, allowing you to run Git commands from any command prompt or terminal.
- Configuring the line ending conversions: Choose how Git should handle line endings (LF vs. CRLF). The recommended option is "Checkout Windows-style, commit Unix-style line endings".
- Choosing a terminal emulator to use with Git Bash: Select your preferred terminal emulator. The default option is "Use MinTTY (the default terminal of MSYS2)", which provides a good experience.
-
Complete the Installation: After configuring the settings, click "Install" to begin the installation process. Once the installation is complete, you can launch Git Bash or Git GUI from the Start menu or by right-clicking in a folder and selecting the corresponding option.
-
Verify the Installation: Open a command prompt or Git Bash and run
git --version
to verify that Git is installed correctly.
2. Using Windows Subsystem for Linux (WSL)
WSL allows you to run a Linux environment directly on Windows. You can then use the package manager within the Linux distribution to install Git.
Explanation:
WSL provides a powerful way to access Linux tools and utilities on Windows. By installing a Linux distribution like Ubuntu or Debian through WSL, you gain access to their respective package managers (apt, in the case of Ubuntu/Debian). This allows you to install Git using the familiar commands you would use on a native Linux system. This method is particularly appealing to developers who are comfortable with Linux environments and prefer using the command-line interface for managing software.
Steps:
-
Enable WSL: Open PowerShell as an administrator and run the following command:
wsl --install
This command will install WSL with the default Ubuntu distribution. If you want to install a different distribution, you can list available distributions with
wsl --list --online
and then install a specific distribution withwsl --install -d <DistributionName>
. -
Restart Your Computer: Restart your computer to complete the WSL installation.
-
Launch Your Linux Distribution: After restarting, launch the installed Linux distribution from the Start menu. The first time you launch it, it will take a few minutes to set up the environment. You will be prompted to create a user account and password.
-
Update Package Lists: Open a terminal window in your Linux distribution and run the following command to update the package lists:
sudo apt update
-
Install Git: Run the following command to install Git:
sudo apt install git
-
Verify the Installation: Run
git --version
to verify that Git is installed correctly.
Code Example (within WSL terminal):
# Update package lists
sudo apt update
# Install Git
sudo apt install git
# Verify Git installation
git --version
This alternative provides a Linux environment for development within Windows, which some developers prefer. It ensures consistent environments and easier management of dependencies. Choosing the best method to Install Git on Windows 11 depends on the user’s needs and preferences.