How to Install Git on Windows 11

Git is the version control tool most developers use to track code changes. On Windows 11 you can install it with the official installer or with one winget command, then set your name and email so your commits are labeled.

Quick Answer

Open Terminal and run winget install –id Git.Git -e –source winget, or download the installer from git-scm.com and accept the recommended options. Then run git –version to confirm.

How to Install Git on Windows 11

  1. Open Windows Terminal (right-click Start, Terminal).
  2. Run winget install –id Git.Git -e –source winget and accept any prompts.
  3. Or download the 64-bit installer from git-scm.com and run it.
  4. In the installer, keep the recommended PATH option so Git works from any terminal, and the default line-ending settings.
  5. Close and reopen Terminal, then run git –version to confirm.
  6. Set your identity: git config –global user.name followed by your name in quotes, and git config –global user.email followed by your email address in quotes.
Setup wizard PATH environment step with the recommended command line option highlighted
Keep the recommended PATH option during setup.

Install Methods

Method Notes
winget One command; easy updates with winget upgrade
Official installer Most options; from git-scm.com
GitHub Desktop Bundles Git with a graphical app
WSL Install Git inside Linux instead
Update winget upgrade –id Git.Git or rerun the installer

Troubleshooting

  • git is not recognized: close and reopen Terminal. If it persists, rerun the installer and choose the recommended PATH option.
  • winget not found: install or update App Installer from the Microsoft Store.
  • Wrong line endings in shared repos: set core.autocrlf consistently across your team.
  • Setting up a dev machine? See how to install Python on Windows 11 and how to install VS Code.

Frequently Asked Questions

Is Git free?

Yes. Git is free and open source.

Do I need a GitHub account?

Not to use Git locally. You need an account only for hosted repositories.

Does Git Bash come with it?

Yes, the official installer includes Git Bash.

How do I uninstall Git?

Settings, Apps, Installed apps, Git, Uninstall.

Summary

  1. Open Terminal.
  2. Install with winget or the installer.
  3. Keep the recommended PATH option.
  4. Check git –version.
  5. Set your name and email.