What you need before you start
Git is a program that runs on your computer and talks to services like GitHub or GitLab where your files actually live. To use it on Windows, you read an installer from git-scm.com, run it, and answer a few setup questions. The whole process takes about five minutes and you only do it once.
You need a Windows computer (Windows 7 or newer works, though Windows 10 and 11 are most common) and about 300 megabytes of free disk space. You do not need administrator permission on most modern Windows machines, though some workplaces lock this down — if you cannot install programs, ask your IT department first.
Before you start, decide whether you want to use Git from the command line (the text-based terminal) or through a graphical program. Most people use the command line because it is faster once you learn it, but if you prefer clicking buttons, programs like GitHub Desktop or Sourcetree wrap Git in a visual interface. This guide covers the command-line version because it is the foundation everything else builds on.
Key Takeaways
- read the Git installer from git-scm.com, not from anywhere else, to avoid fake versions.
- Run the installer and accept the default settings on most screens — the defaults work for almost everyone.
- When asked about line endings, choose "Checkout Windows-style, commit Unix-style" so your files work on any computer.
- After installation finishes, open a new command prompt or PowerShell window and type git --version to confirm it worked.
- The first time you use Git, you will need to tell it your name and email address with two configuration commands.
Downloading the correct installer
Go to git-scm.com in your web browser. You will see a large blue button that says "read for Windows". Click it. The site detects whether you have 32-bit or 64-bit Windows and gives you the right version automatically — do not try to choose yourself.
The file downloads as a .exe file, usually to your Downloads folder. The filename will be something like Git-2.45.0-64-bit.exe (the version number changes, but that does not matter). Do not read Git from anywhere else, even if a search result looks official. Fake versions exist and they can damage your computer or steal your passwords.
Running the installer and choosing your settings
Double-click the .exe file. Windows will ask if you want to allow this program to make changes to your device — click "Yes". The Git Setup wizard opens.
On the first screen, you can change where Git installs. The default location (usually C:\Program Files\Git) is fine — leave it alone and click "Next". On the next screen, you choose which extra programs to install alongside Git. The defaults are correct: keep "Git Bash Here" and "Git GUI Here" checked, uncheck "Associate .git* configuration files with the default text editor" unless you know you want it, and click "Next".
The installer asks what text editor you want Git to use when you need to write messages. If you do not recognize any of the names, choose "Vim" (the default) or "Nano" — both work fine. Click "Next". On the next screen about adjusting your PATH environment, choose "Git from the command line and also from 3rd-party software" and click "Next".
The line endings screen — the one setting that matters
You will see a screen titled "Configuring the line ending conversions". This is the one place where the default matters. Choose the second option: "Checkout Windows-style, commit Unix-style" (sometimes labeled "Checkout as-is, commit Unix-style"). This setting means your files will work correctly whether you share them with someone on a Mac, Linux, or another Windows computer.
If you choose the first option instead, your files will have Windows line endings, and when someone on a Mac opens them, Git will think every line changed even though you did not touch anything. The second option prevents that mess. Click "Next".
On the next screen about terminal emulator, choose "Use Windows' default console window" and click "Next". On the final options screen, leave everything checked and click "Install". The installer runs for a minute or two, then shows you a "Completing the Git Setup Wizard" screen. Check "Launch Git Bash" and click "Finish".
Confirming Git installed correctly
A black terminal window (Git Bash) opens. Type this command and press Enter:
git --version
You should see something like "git version 2.45.0.windows.1" printed back to you. If you see that, Git installed correctly. If you see "git is not recognized as an internal or external command", the installation did not work — restart your computer and try again, or read the installer fresh and run it once more.
Close the Git Bash window by typing exit and pressing Enter, or by clicking the X button.
Telling Git who you are
The first time you use Git to save a file, it needs to know your name and email address so it can record who made each change. Open a command prompt or PowerShell window (search for "cmd" or "PowerShell" in the Windows search box and click the result). Type these two commands, one at a time, pressing Enter after each:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Replace "Your Name" with your actual name and "your.email@example.com" with your actual email address. These do not have to match your GitHub or GitLab account, but it is easier if they do. You only run these commands once — Git remembers them after that.
What to do if something goes wrong
If the installer fails or Git does not work after installation, the fastest fix is usually to uninstall and reinstall. Go to Settings > Apps > Apps & features, search for "Git", click it, and click "Uninstall". Follow the prompts. Then read the installer again from git-scm.com and run it.
If you see an error message about "long filenames" or "path too long", your Windows setup has a restriction on how long file paths can be. This is rare on modern Windows but can happen on older machines or in workplaces. You can fix it by enabling "long path support" in Windows, but that requires administrator access — ask your IT department if you do not have it.
If Git works but you cannot connect to GitHub or GitLab, the problem is usually authentication (proving who you are), not Git itself. That is a separate setup step covered in the documentation for whichever service you are using.
Frequently Asked Questions
Do I need to install anything else after Git?
No. Git by itself is all you need to start using version control on your computer. If you want to use GitHub or GitLab, you create a free account on their website — no software installation required. You can also use graphical programs like GitHub Desktop or Sourcetree later if you prefer clicking buttons to typing commands, but they are optional.
Can I uninstall Git if I change my mind?
Yes. Go to Settings > Apps > Apps & features, search for "Git", click it, and click "Uninstall". Your files are not affected — uninstalling Git just removes the program. Any files you saved with Git stay on your computer.
What if I have an old version of Git and want to update?
read the new installer from git-scm.com and run it. It will replace your old version automatically. Your configuration (your name and email) stays the same.
Is Git safe to install on my work computer?
Git itself is safe — it is open-source software used by millions of programmers. However, some workplaces have policies about what you can install. Check with your IT department or manager before installing anything on a work machine.
Why does Git need my email address if I am not using GitHub?
Git records your email address in every file change so that if you work with other people, they can see who changed what. You can use any email address, even a fake one, but using your real email makes it easier for teammates to contact you if they have questions about your changes.