Git itself is the easy part. The decisions around it—who can invoke it, which SSH client it uses, how it rewrites line endings, and where credentials live—are what surface months later as “works on my machine” failures. A careful Windows installation takes only a few extra minutes and makes every repository calmer.
What Git for Windows includes
The native
git.execommand-line client and standard Git plumbing/porcelain commands.Git Bash, an MSYS2-based Bash environment with familiar Unix-style tools and path translation. It is not WSL and does not run a full Linux kernel.
Git GUI, bundled OpenSSH, and Git Credential Manager in the standard distribution.
Shell integrations and optional context-menu entries selected by the installer.
Check platform support before installing
Current Git for Windows builds require a supported 64-bit Windows environment. The project documents Windows 8.1 or later for x64 and Windows 11 for ARM64; legacy 32-bit installers ended after the 2.48 series. On managed or older machines, confirm the support matrix rather than downloading an archived executable.
Option 1: install with WinGet
winget install --id Git.Git -e --source wingetRisk level: caution. Review the command before running it.
What this installation request means
--id Git.Gitidentifies the Git for Windows package and-erequires an exact ID match.--source wingetprevents another configured source from satisfying this command unexpectedly.WinGet displays package agreements and planned changes before installation; read them in a managed environment.
Close and reopen PowerShell, Command Prompt, Windows Terminal, and IDE terminals afterward because running processes retain their old PATH.
Option 2: use the official interactive installer
Download the current x64 or ARM64 setup program only from Git’s official Windows installation page. Avoid pinning a versioned filename in documentation: the old Git-2.26.0-64-bit.exe from this article is years behind current security and compatibility work.
Get-FileHash .Git-*-64-bit.exe -Algorithm SHA256
Get-AuthenticodeSignature .Git-*-64-bit.exe | Format-List Status,SignerCertificateVerify provenance, not just the filename
Get-FileHashcalculates a SHA-256 digest; compare it with a checksum published through an official release channel when available.Get-AuthenticodeSignaturechecks Windows signature metadata. Inspect a valid status and expected publisher before executing the installer.A filename is not proof of authenticity, and a checksum copied from the same untrusted download location adds little protection.
If the wildcard matches multiple installers, select the exact downloaded path rather than hashing an arbitrary file.
Installer screens that deserve a real decision
PATH environment
For most developers, Git from the command line and also from third-party software is the practical choice: Git Bash, PowerShell, Command Prompt, IDEs, and build tools can all call Git. The Bash-only choice reduces PATH impact but surprises Windows tooling. Avoid adding Git’s entire Unix toolset ahead of native Windows tools unless you understand name collisions.
HTTPS and SSH transport
The bundled OpenSSH client is predictable for a new installation. Choose an external OpenSSH only when your organization already manages Windows OpenSSH configuration and keys. Keep the default TLS backend unless certificate policy explicitly requires Windows Secure Channel; enterprise proxy and certificate behavior can differ.
Line endings
There is no universal “Windows answer.” The common checkout-Windows/commit-Unix option corresponds to core.autocrlf=true, but repositories with scripts, containers, or cross-platform contributors should define text behavior in a committed .gitattributes file. Repository policy should outrank one developer’s global preference.
Terminal and symbolic links
MinTTY gives Git Bash its Unix-like terminal experience; the Windows console option integrates differently with native programs. Symbolic-link checkout needs both Git configuration and Windows permission—commonly Developer Mode or elevation. Do not enable it merely because an old screenshot says so.
Verify the executable Windows actually found
git --version
where.exe git
git --exec-pathRead all three results together
git --versionproves a Git executable starts and records its release.where.exe gitlists matches in Windows PATH order, exposing stale installations bundled by other tools.git --exec-pathprints the directory containing Git’s helper programs and helps identify a mixed installation.If an IDE reports another version, restart it and inspect its configured Git executable rather than repeatedly editing PATH.
Set the identity written into commits
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch mainThis is authorship metadata, not authentication
--globalwrites the setting for the current Windows user, usually in the home-directory.gitconfig.user.nameanduser.emailbecome part of every new commit; use an address appropriate for the hosting account and privacy policy.A repository-local value in
.git/configoverrides the global value—useful when work and personal identities differ.These fields do not sign you in to GitHub/GitLab and do not cryptographically sign a commit. Authentication and signing are separate configurations.
Audit configuration and its source files
git config --list --show-origin
git config --global --get user.name
git config --global --get user.emailWhy --show-origin matters
Git merges system, global, local, and command-scoped configuration; later/more specific scopes can override earlier ones.
--show-originidentifies the file that supplied each value, which is more useful than a flat list when settings conflict.Run the command inside and outside a repository to reveal local overrides.
Do not paste an unreviewed full configuration into a public issue; URLs and helper settings can disclose private infrastructure.
Credentials and SSH keys
Prefer Git Credential Manager for HTTPS tokens and interactive OAuth rather than placing secrets in remote URLs or plaintext credential files.
For SSH, generate a modern key according to the hosting provider’s current instructions, protect it with a passphrase, and verify the host fingerprint before accepting it.
Do not copy a private key between unrelated users or commit
.ssh, token files, or credential exports.Corporate proxies, smart cards, SSO, and certificate authorities require organization-specific setup; do not disable TLS verification to “fix” them.
Create a harmless first repository
mkdir git-install-check
cd git-install-check
git init
printf "# Git install check\n" > README.md
git add README.md
git commit -m "Verify Git installation"
git statusWhat this end-to-end test proves
git initcreates the repository metadata in.git; it does not contact a hosting service.git addplaces the selected file content in the index, andgit commitrecords a snapshot with your configured identity.A successful commit exercises executable discovery, configuration, filesystem access, and Git’s object database.
git statusshould report a clean working tree. Delete this throwaway directory later only after confirming it contains nothing valuable.
Update and troubleshoot Git for Windows
winget upgrade --id Git.Git -e --source wingetRisk level: caution. Review the command before running it.
Keep update ownership consistent
Use the same trusted channel that installed Git so package state remains understandable.
Read the proposed version and release notes before upgrading machines that run production build automation.
Open terminals and long-running IDEs may continue using old processes until restarted.
Back up deliberate configuration and keys, but never solve an upgrade issue by publishing their contents.
Common failures
`git` is not recognized: start a new terminal, inspect
where.exe git, and repair the installer’s PATH selection.Commits use the wrong identity: run
git config --list --show-origininside the repository and correct the appropriate scope.Shell scripts gain `^M` errors: commit a project
.gitattributes, then deliberately renormalize reviewed files; do not toggle global settings blindly.Permission denied (publickey): test the exact remote host/account, loaded key, agent, and remote URL. Reinstalling Git rarely repairs server authorization.
Symlinks become text files: verify Windows Developer Mode/privilege,
core.symlinks, repository policy, and the filesystem.HTTPS certificate error: install the approved CA/proxy configuration. Never set
http.sslVerify=falseglobally.
Related Git guides
Continue with creating a GitHub repository.
If a transfer fails, diagnose Git curl 56 and GnuTLS errors without disabling transport security.
Official references
Git’s current Windows installation page publishes maintained installers and the official WinGet command.
Git for Windows documents its Windows and architecture requirements.
The Pro Git book explains first-time identity, editor, and configuration scopes.
Comments and corrections