Install Git via PowerShell
It's easy!
Run:
winget install --id Git.Git -e --source winget
Then you'll see something like:
Found Git [Git.Git] Version 2.42.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/git-for-windows/git/releases/download/v2.42.0.windows.1/Git-2.42.0-64-bit.exe
██████████████████████████████ 58.3 MB / 58.3 MB
Successfully verified installer hash
Starting package install...
The installer will request to run as administrator, expect a prompt.
Successfully installed
Even though it says The installer will request to run as administrator, expect a prompt.
, I was not required to enter an admin password, which is nice on an IT administered work laptop.
After installation, close the PowerShell window!
Open another PowerShell window and you should be able to check your git version:
git --version
git version 2.42.0.windows.1
You're good to go!