Install Git with WinGet
Duration: 2 minutes
1. Check that Git is installed
1.1 Open PowerShell (Admin) window
1.2 Execute command
Type in PowerShell prompt and press Enter to execute
git --versionIf some version is returned, then Git is installed

If the error The term 'git' is not recognized appears, then Git is not installed

Perform next group of steps when Git is not installed
2. Install Git
2.1 Check that WinGet is installed
Additional Info
WinGet is a Microsoft's standard command-line tool for downloading and installing applications from the Windows Package Manager registry.
It is pre-installed on most current versions of Windows 10 and 11 (except IoT Edge), making it a convenient tool for automating software installation that simplifies the process and works right out of the box.
Type in PowerShell prompt and press Enter to execute
winget --versionIf some version is returned, then WinGet is installed

If the error The term 'winget' is not recognized appears, then WinGet is not installed

In this unlikely case,
2.2 Install Git with WinGet
Type in PowerShell prompt and press Enter to execute
winget install --id Git.Git -e --scope machineCommand parameters explanation
The --id parameter specifies the name of the application to install.
The -e (or --exact) flag tells WinGet to match the package name exactly, so it will only install the package that precisely matches the name you type.
Without this flag, WinGet may install a package with a similar but not identical name, which can lead to unexpected results.
The --scope parameter specifies whether to install a package for the entire system (machine) or just the current user (user).
In most cases, using machine is preferable, as it makes the package available to all users on the computer.
2.3 Agree with MS Store Terms
If you're running WinGet for the first time, the following message may appear

Just type y and press Enter to agree.