How to Install Git on Windows Step by Step

A guide for juniors: install Git on Windows from the official download, choose the right installer options, and confirm it works with git --version.

How to Install Git on Windows Step by Step

The first time someone told me to “install Git” and I looked up how, the installer threw a dozen screens at me full of options I didn’t understand. I clicked things at random and hoped for the best. If you’re at that point right now, this post walks you through installing Git on Windows without surprises: what to download, what to click on each screen that actually matters, and how to confirm it’s working.

You don’t need to know how to use the terminal or have touched version control before. You just need a computer running Windows 10 or 11 and permission to install programs.

What Exactly Are You Installing?

You’re going to install two things that come in the same package: Git and Git Bash.

Git is the version control program. Think of it as the “save game” feature of a video game, but for your code: every time you make an important change, Git saves a snapshot of how everything looked at that moment, and you can go back to any previous snapshot when something breaks. That’s the whole idea. If you want to take the concept slowly before moving on, there’s a dedicated guide to understanding what Git is and taking your first steps, but you don’t need it to install Git.

Git Bash is a terminal. A terminal is that black window where you type commands instead of clicking buttons. Windows already comes with its own (CMD and PowerShell), but Git Bash is special: it comes preloaded with Git and a bunch of commands in the style used on Linux and Mac. That’s going to come in handy, because almost every Git tutorial you find out there assumes those commands.

In short: one package, two tools. Now let’s go get it.

Where Do You Download Git for Windows?

Always download Git from the official site: git-scm.com. Go to https://git-scm.com/download/win and you’ll see the Windows installer, known as Git for Windows.

The page detects your system and offers you the right installer for your machine, which for most people is the 64-bit version. Download the standard installer (the one ending in .exe) and save it somewhere you can find your downloaded files, usually the Downloads folder.

Why do I keep insisting on the official site? Because “git” is a heavily searched term, and there are sites offering modified installers bundled with ads or worse. The official installer is free, with no gimmicks and no sign-up required. If the URL isn’t git-scm.com, close the tab.

Once you’ve downloaded the .exe, double-click it to start. This is where people tend to get nervous, so let’s go screen by screen.

How Do You Run the Installer Step by Step?

The installer is a sequence of screens, each with a Next button. The good news: almost all the default options are correct for getting started. Only five decisions are worth pausing on.

The walkthrough starts with the license (it’s free software) and the installation folder, where there’s nothing to touch. Next, in the components screen, leave the file explorer integration checked: it lets you open Git from the right-click menu.

Flowchart with four steps: download from git-scm.com, run the installer, choose the key options (editor, main branch, PATH), and verify with git --version
The full journey, from download to verification.

From there you’ll hit the configuration screens, which are the ones that matter. I put the five decisions that actually change something into a table so you know exactly what to choose without overthinking it.

Which Installer Options Actually Matter?

These are the five decisions that genuinely make a difference. For everything else, click Next without worrying.

Installer screenWhat to choose to get startedWhy
Default editorSwitch from Vim to one you already know (Visual Studio Code or Notepad)Git opens this editor to write commit messages. Vim is powerful but has its own rules, and it’s easy to get stuck without knowing how to exit.
Initial branch nameCheck “Override the default branch name” and type mainIt’s the standard name today for the main branch. Many older tutorials use master; if you choose main from the start, your project matches what you’ll see on GitHub and in current courses.
PATH settingLeave the recommended middle option: “Git from the command line and also from 3rd-party software”This is what lets you type git in any Windows terminal, not just inside Git Bash. Without it, the git command isn’t recognized outside Git Bash.
Line endingsLeave the recommended option: “Checkout Windows-style, commit Unix-style line endings”Windows and Linux mark the end of each line of text differently. This option handles the conversion for you so you don’t see odd changes when collaborating with people on other systems.
Credential managerLeave Git Credential ManagerIt securely stores your GitHub credential. The first time, it will open your browser so you can log in with your account (your password hasn’t worked for this since 2021), and after that it won’t ask again.

Of all of them, the PATH one is the one people forget most often and the one that causes the most headaches afterward. If you’re unsure about any other, the option that’s already checked is always a safe choice. Once you’ve gone through all the screens, click Install, wait for the progress bar to finish, and you’re done.

What Is Git Bash and When Do You Use It?

Git Bash is the terminal you just installed alongside Git, and it’s where you’ll type most of your commands when starting out. When you open it, you see a window with some text and a blinking cursor waiting. You type a command there, press Enter, and Git responds.

The advantage of Git Bash over CMD is that it understands “Unix-style” commands (ls to list files, pwd to see where you are, cd to change folders) that show up in practically every tutorial. If you follow a tutorial and copy its commands, they’ll work inside Git Bash without any translation.

So when do you use it? At the start, for everything related to Git. Open it from the Start menu by searching for “Git Bash,” or right-click inside one of your project folders and choose “Open Git Bash here” (this option shows up thanks to the file explorer integration you left checked earlier). Later on, if you chose the PATH option I recommended, you’ll also be able to use git from PowerShell or from your editor’s built-in terminal. But for your first steps, Git Bash is your home base.

There’s a question probably nagging at you: how do you know all this actually worked?

How Do You Check That Git Installed Correctly?

To confirm Git installed correctly, open a new terminal and run git --version. If it returns a version number, you’re done.

Open Git Bash (or PowerShell, if you chose the PATH option) and type this:

# Ask Git to show the installed version
git --version

# If everything went well, you'll see something like this.
# Your number might be higher; what matters is that a version shows up:
# git version 2.51.0.windows.1

That git version 2.51.0.windows.1 is proof that Git is installed and responding. The exact number doesn’t matter: a new version comes out every few weeks, so if you see a higher number, even better. What matters is that the word version shows up followed by digits, not an error message.

If instead of the version you see an error like “git is not recognized,” don’t panic. It’s the most common failure, and it’s an easy fix. Let’s cover that right now.

Common Errors When Installing Git on Windows

Almost all first-day problems fall into one of these four. None of them are serious.

“‘git’ is not recognized as an internal or external command, operable program or batch file.”

This message means the terminal can’t find Git. It’s almost always one of two reasons: you didn’t check the PATH option during installation, or you did check it but you’re testing in a terminal that was already open beforehand.

The quick fix: try Git Bash first, since it always recognizes git even if the PATH is broken. If it works in Git Bash but not in PowerShell, the problem is the PATH. You can rerun the installer, choose the recommended PATH option, and let it reinstall on top; it keeps your configuration.

Forgetting to Reopen the Terminal

When you install Git, Windows updates the PATH, but any terminals you already had open don’t pick up the change. They keep using the list of programs that existed when you opened them.

Close any terminal you have open and start a new one. It sounds trivial, but it fixes a huge share of first-attempt “it doesn’t work” problems.

Downloading Git from a Non-Official Site

I already mentioned this, but it’s common enough to repeat: only download from git-scm.com. Installers from third-party sites sometimes come bundled with adware or with outdated versions that default to the master branch instead of main. Free and official is the only combination you want.

Accidentally Choosing Vim and Getting Stuck

If you left Vim as your editor and at some point Git opens a screen full of text where you can’t type normally or close it with your mouse, you’re inside Vim. To exit without saving, press the Esc key, then type :q! and press Enter. That’s why I recommended choosing an editor you already know: it saves you this moment of cold sweat.

What’s Next?

You now have Git installed and verified, but it still doesn’t know who you are. Before creating your first repository, Git needs you to tell it your name and email, because it stores them in every “snapshot” you make of your code. That’s the natural next step: setting up Git for the first time, which is quick and only needs to be done once per computer. After that comes the fun part: creating your first repository and starting to save versions of a real project.

If you’d rather learn all this by practicing instead of just reading, the course Git from Zero to Professional takes you from this first installation all the way to handling branches and collaborating with confidence, with interactive exercises at every step.

Frequently Asked Questions

Is Installing Git on Windows Free?

Yes. Git is free, open-source software, and the official Git for Windows installer costs nothing and has no paid version. Always download it from git-scm.com.

Do I Need a GitHub Account to Install Git?

No. Git installs and runs on your computer without any account. GitHub is a separate service for storing your repositories online, and you’ll only need an account the day you want to push your code there. For practicing locally, Git alone is enough.

Are Git and GitHub the Same Thing?

No, even though people mix them up constantly. Git is the version control program that runs on your computer. GitHub is a website where you can host Git repositories and collaborate with other people. You can use Git for months without touching GitHub, and it’s actually a good idea to learn Git first.

Can I Change the Installer Options Later?

Yes. Almost everything you choose in the installer is Git configuration that can be changed later with commands, or by rerunning the installer and picking different options. For example, if you left master as the default branch and prefer main, you can change it anytime with git config --global init.defaultBranch main, without reinstalling anything. So if you got the editor or the branch wrong, you haven’t broken anything: it’s fixable.

What Windows Version Do I Need to Install Git?

64-bit Windows 10 or 11 is more than enough, and that’s what the vast majority of current computers have. The official installer offers you the 64-bit version directly, so you don’t need to figure out anything on your own.

One new concept every week