How to Install Git on Windows (Choco/Scoop/Winget)
With Winget
winget install --id Git.Git -e --source wingetWith Scoop
scoop install gitWith Chocolatey
choco install gitOfficial Git Installer for Windows
Step 1 - Download Git installer
Download the latest version of Git for Windows from the official website.
Step 2 - Run the installer
- Double-click the
.exefile you downloaded - Follow the installation wizard:
Important installation options:
- Select Components: Choose “Git Bash Here” and “Git GUI Here” for right-click context menus
- Choosing the default editor: Select your preferred text editor (VS Code, Notepad++, etc.)
- Adjusting your PATH environment:
- Recommended: “Use Git from the Windows Command Prompt”
- This allows you to use
gitcommands in regular Command Prompt and PowerShell
- Choosing HTTPS transport backend: Select “Use the OpenSSL library”
- Configuring the line ending conversions:
- If you work only on Windows: “Checkout Windows-style, commit Unix-style line endings”
- If you work across platforms: “Checkout as-is, commit Unix-style line endings”
Step 3 - Complete installation
Click “Install” and wait for the process to complete. You may need to grant administrator permissions.
Step 4 - Verify the installation
- Open Command Prompt, PowerShell, or Git Bash
- Type the following command:
git --versionIf this outputs the current version, the installation was successful.
ℹ️
Git Bash provides a Unix-like terminal environment on Windows, which can be helpful for following along with most Git tutorials.
Last updated on