How To Install Git on Windows: Step‑By‑Step Guide
Git is one of the most widely used tools for tracking changes in code and collaborating with others. On Windows, installing Git is straightforward once you know which options matter and which you can safely ignore.
This guide walks through what Git is, how to install Git on Windows, and which choices during setup depend on your system and your habits.
What Is Git and Why Install It on Windows?
Git is a version control system. In plain language, it:
- Keeps a history of changes to your files (often code, but not only code)
- Lets you go back to earlier versions if something breaks
- Makes it easier to collaborate with others by merging changes
On Windows, installing Git gives you:
- The
gitcommand in Command Prompt, PowerShell, and optionally a Unix‑style shell called Git Bash - Tools that integrate with code editors like VS Code
- The option to use Git with hosting services (e.g., remote repositories)
You can use Git even if you never plan to share your code; it’s like an unlimited undo history for your project folders.
System Requirements and Versions: What You Need First
Before installing, it helps to know what you’re working with.
Windows Versions Git Supports
Modern Git for Windows typically supports:
- Windows 10 (64‑bit)
- Windows 11
Older versions of Windows can sometimes use older Git releases, but you might miss security fixes and newer features. For most people on a relatively current PC, the standard 64‑bit installer is the right choice.
32‑bit vs 64‑bit Git
You’ll usually choose between:
| Option | When it’s typically used |
|---|---|
| 64‑bit Git | Most modern Windows PCs (recommended default) |
| 32‑bit Git | Very old systems or specific compatibility needs |
You can check your system type by going to Settings → System → About and looking at System type.
How To Download Git for Windows Safely
The most important part of installing Git is getting it from a trusted source.
- Open your web browser.
- Go to the official Git for Windows website (search “Git for Windows download” and pick the official project link).
- Click the download link for Windows.
- Your browser will download an
.exeinstaller file.
General safety guidelines:
- Avoid third‑party download sites where possible.
- If your browser or security software warns you about the download, read the warning carefully instead of bypassing it automatically.
Running the Git Installer: Core Steps
Once you’ve downloaded the installer:
- Double‑click the
.exefile you downloaded. - If Windows asks “Do you want to allow this app to make changes?”, click Yes.
- The Git Setup Wizard opens.
From here, you’ll see several screens with options. Many users can accept the defaults, but some choices can affect how comfortable Git feels.
Key Installation Options and What They Mean
During setup, Git will ask you a series of questions. Here are the most important ones and what they change.
1. Install Location
Git suggests a default folder, often:
C:Program FilesGit
You can usually accept the default unless you:
- Have strict rules about where software lives
- Use a separate drive for applications
2. Components to Install
Common choices here include:
- Git Bash – a terminal with Unix‑style commands (like
ls,rm, etc.) - Git GUI – a simple graphical tool for Git operations
- Desktop icons or context menu integration
Most users keep Git Bash enabled because it’s the main way many guides and tutorials show Git commands.
3. Start Menu Folder
You can leave the default or opt not to create a folder if you prefer a cleaner Start menu.
4. Choosing the Default Editor for Git
Git occasionally opens a text editor for things like commit messages or merge conflict resolutions.
Typical choices:
- Vim (default in many installers): powerful but not beginner‑friendly
- Notepad: simple and familiar
- Other editors installed on your system (like VS Code or similar), if detected
Choosing a plain, familiar editor makes your first Git experiences less intimidating. Developers familiar with terminal editors might prefer Vim or another advanced editor.
5. Adjusting Your PATH Environment
The PATH option decides where you can run the git command from:
Git from Git Bash only
You can run Git inside Git Bash, but not from Command Prompt or PowerShell.Git from the command line and also from 3rd‑party software (common default)
You can usegitin Command Prompt, PowerShell, Git Bash, and many tools that expect Git to be available.Use Git and optional Unix tools from the command prompt
This also adds more Unix‑style commands globally, which can affect other tools that expect Windows commands.
If you mainly plan to follow tutorials that run git in PowerShell or Command Prompt, having Git available in the PATH is helpful.
6. HTTPS Transport Backend
Git uses HTTPS when talking to remote repositories.
Use the bundled OpenSSL library
Git uses its own SSL implementation. Works on most setups.Use the native Windows Secure Channel library
Uses Windows’ own security layer.
Either works in many cases. If you’re in a corporate environment with strict security policies or proxies, your IT team might care about this choice more than you do.
7. Line Ending Conversions (CRLF vs LF)
Different operating systems handle line endings in text files differently:
- Windows uses CRLF
- Linux/macOS use LF
The installer usually offers:
Checkout Windows‑style, commit Unix‑style line endings
Converts files to CRLF on your machine, but stores them as LF in Git. Good for cross‑platform projects.Checkout as‑is, commit as‑is
Git doesn’t change line endings.Checkout as‑is, commit Unix‑style line endings
Leaves checked‑out files as they are, but converts to LF on commit.
This choice matters more if you share code with people on Linux/macOS or use tools sensitive to line endings.
8. Default Branch Name
Git can set a default name for new repositories’ main branch (like main or master). Many modern platforms use main as the default, but settings vary.
This mainly affects:
- New repositories you create on your machine
- How easily your local branches line up with hosting services
9. Terminal Emulator and Other Advanced Settings
You may see options for:
- Terminal emulator (which terminal Git Bash uses)
- Performance options (e.g., file system caching)
- Extra features (like credential helpers or symbolic link handling)
Defaults are usually tuned to be safe and broadly compatible. Changing these is most useful if:
- You use a specific terminal heavily
- You’re working with huge repositories
- You have particular security or compatibility needs
Verifying That Git Installed Correctly
After completing the wizard, you can confirm your installation:
Open Git Bash, Command Prompt, or PowerShell.
Type:
git --versionPress Enter.
If Git is installed and on your PATH, you’ll see something like:
git version X.Y.Z.windows.N If you get an error that git is not recognized, it usually means:
- Git isn’t on your PATH (you may have chosen “Git from Git Bash only”), or
- The installation didn’t finish correctly
You can reopen the installer and adjust the PATH settings, or reinstall.
Basic Post‑Install Setup: Your Identity and Defaults
Once Git is installed, there are a couple of simple setup steps that make your commits more meaningful.
Set Your Name and Email
Git tags each commit with a name and email address:
git config --global user.name "Your Name" git config --global user.email "[email protected]" - This doesn’t have to be your real email, but it should match what you plan to use with any remote services.
- The
--globalflag applies these settings to all repositories on your machine.
Check Your Configuration
You can see your global Git settings with:
git config --global --list This helps confirm that your identity and other basics are set.
Variables That Change How You Should Install Git on Windows
While the core installer is the same, your best choices for editor, PATH, line endings, and extras depend on:
- Windows version and whether you’re on 32‑bit or 64‑bit
- Where you run commands most often:
- Command Prompt
- PowerShell
- Git Bash
- Terminal inside your code editor
- Collaboration style:
- Solo projects vs team projects
- Same OS vs mixed (Windows + macOS + Linux)
- Development tools:
- Which IDE or editor you use
- Whether you rely on GUI Git tools or CLI only
- Work environment:
- Home vs company laptop
- Company security policies and proxies
- Technical comfort level:
- Preference for simple, familiar editors (like Notepad)
- Willingness to learn terminal‑centric tools
The same Git installer can feel very different depending on which combination of these applies to you.
Different Windows User Profiles, Different Git Setups
To see how these variables matter, consider some typical Windows users:
1. New Programmer on a Home Windows 11 Laptop
- Likely prefers:
- Simple editor (e.g., Notepad or a familiar GUI editor)
- Git available in Command Prompt / PowerShell
- Defaults for line endings and branch names
- May rely on:
- Tutorials using Git Bash or an integrated terminal in a code editor
Their main goal is getting something that “just works” without wrestling with advanced options.
2. Corporate Developer on a Domain‑Joined Windows 10 Machine
- Might need to:
- Match company standards for default branch name
- Use company‑preferred HTTPS backend due to proxies
- Rely on credential helpers that integrate with corporate authentication
- Often:
- Uses Git heavily inside an IDE
- Works on shared repositories with strict rules
Here, even small Git installation choices can interact with security, compliance, and workflow rules.
3. Cross‑Platform Developer Using WSL and Windows Tools
- May:
- Use Git on both Windows and inside WSL (Windows Subsystem for Linux)
- Care more about line endings and file permissions
- Prefer Unix‑style tools and terminal emulators
- Needs to:
- Think about how Git on Windows interacts with Git inside WSL
Their best setup might try to balance Windows convenience with Linux‑like behavior.
4. Occasional User Just Cloning Repos for Testing
- Might:
- Rarely commit
- Only need Git to download sample projects or tools
- Probably:
- Doesn’t care much about advanced editor or line ending settings
- Wants minimal friction and little to configure
Git for them is more of a download tool than a daily workflow engine.
Where Your Own Setup Becomes the Missing Piece
Installing Git on Windows follows a predictable path: download the official installer, run through the wizard, accept safe defaults, and verify with git --version. That part is the same for almost everyone.
The details that actually shape your experience—which editor you pick, how you set your PATH, how Git handles line endings, what identity you configure, and how it fits with your tools and workplace rules—all depend on how you use your Windows machine, which software you rely on, and how deeply you plan to work with Git.
Understanding the options is one half of the job; looking at your own Windows version, tools, and habits is the other half that determines which Git setup makes the most sense for you.