Download and run the official Git installer

The fastest way to get Git on Windows is to download the installer from git-scm.com, the official Git website. Go to that site, and you'll see a download button for Windows. Click it, and your browser will download a file named something like Git-2.x.x-64-bit.exe (the version number changes, but the filename pattern stays the same).

Once the file finishes downloading, double-click it to start the installer. Windows may ask if you want to allow this program to make changes to your device — click "Yes" to proceed. The installer window will open and walk you through a series of choices about how Git should behave on your machine.

Key Takeaways

  • Download the Git installer from git-scm.com, run the .exe file, and accept the default settings unless you have a specific reason to change them.
  • The installer will ask which text editor you want Git to use for commit messages — Vim is the default, but Nano or Notepad++ are easier for beginners.
  • Choose "Git from the command line and also from 3rd-party software" when asked how you want to use Git, so it works everywhere on your system.
  • After installation finishes, open Command Prompt or PowerShell and type git --version to confirm Git is installed and working.

Choose your default text editor during setup

Early in the installer, you'll see a screen asking "Choose the default editor used by Git." The default option is Vim, a text editor that works differently from what most Windows users expect — it has a learning curve. If you've never used Vim before, you have easier options.

Click the dropdown menu and look for Nano or Notepad++. Nano is simpler and comes built into most systems. Notepad++ is more familiar if you've used a regular text editor before. Either choice will work fine. If you don't see your preferred editor in the list, you can leave Vim selected for now and change it later — this is not a permanent decision.

Select how Git integrates with your system

The installer will ask "Adjusting your PATH environment" or show you options about how to run Git. You want to choose "Git from the command line and also from 3rd-party software." This option means Git will work when you type commands in Command Prompt, PowerShell, or other tools on your computer.

The other options are more restrictive. "Only in Git Bash" means Git only works inside a special Git-only terminal window. You want the broader option so Git is available everywhere you might need it.

Accept the default line-ending settings

Git will ask about line endings — the invisible characters that mark the end of each line in a text file. Windows and Unix-based systems handle these differently, and Git needs to know which format you're working with.

The default option, "Checkout Windows-style, commit Unix-style," is the right choice for most Windows users. It means Git will automatically convert line endings to the format your system expects when you download files, and convert them back when you save. Leave this setting as-is unless you're working on a project with specific line-ending requirements — your team would tell you if that were the case.

Complete the installation and verify it worked

Continue clicking "Next" through the remaining screens. Most of the other options are advanced settings you won't need right away. When you reach the final screen, click "Install" and wait for the installer to finish. This usually takes less than a minute.

Once the installer closes, open Command Prompt or PowerShell (search for either in your Windows Start menu). Type this command and press Enter:

git --version

If Git is installed correctly, you'll see output like "git version 2.42.0.windows.1" or similar. If you see an error saying the command is not recognized, restart your computer and try again — sometimes Windows needs to restart to recognize new programs.

Configure your name and email for commits

Before you start using Git, tell it who you are. This information gets attached to every change you save. Open Command Prompt or PowerShell and type these two commands, replacing the name and email with your own:

git config --global user.name "Your Name"git config --global user.email "your.email@example.com"

The --global flag means these settings apply to every Git project on your computer. If you wanted different settings for a specific project, you could run the same commands without --global while inside that project's folder. For now, the global settings are what you need.

Frequently Asked Questions

Do I need to restart my computer after installing Git?

Not always, but if you open Command Prompt before restarting and Git doesn't work, restart and try again. Windows sometimes needs a restart to recognize new programs in the system PATH.

What's the difference between Git Bash and Command Prompt?

Git Bash is a special terminal that comes with the Git installer and mimics Unix-style commands. Command Prompt and PowerShell are Windows' native terminals. Git works in all three, so use whichever you're most comfortable with.

Can I change my default editor after installation?

Yes. Open Command Prompt and type git config --global core.editor "notepad" (or replace "notepad" with your preferred editor). You can change this anytime without reinstalling Git.

What if the installer says Git is already installed?

Windows may have an older version. Download the latest installer from git-scm.com anyway — it will update your existing installation to the newest version.

Do I need to pay for Git?

No. Git is free and open-source software. The installer from git-scm.com costs nothing.