Installing Git on Windows can be done with or without WSL. Let's explore both ways.
Installing Git with WSL
WSL is a compatibility layer for running Linux binary executables natively on Windows. We have a separate guide on how to install WSL on Windows. You can check it out here. You can install Git on your Windows using WSL by following these steps:
Step 1: Open your WSL terminal.
Step 2: Update the package list using the following command.
Step 3: Install Git using the following command.
Step 4: Verify the installation by running the following command.
This command will display the version of Git installed on your system.
Installing Git without WSL
To install Git on Windows without WSL, we can download the installer from the official Git website. The installer will download the latest version of Git for Windows and provide us with an installation wizard. Follow the on-screen instructions to install Git on your Windows system. You can check out this link for navigating through the installation process. BigBinary academy doesn't recommend anyone to use git without WSL.