Skip to content

How to Install Git on Windows

Installing Git on Windows is a straightforward process. First, you’ll need to download the Git for Windows installer. Head over to https://git-scm.com/download/windows in your web browser.

The download should start automatically, but if it doesn’t, there’s a manual download link available on the page.

Once you’ve downloaded the installer, run it. You’ll be presented with a series of options. For most users, the default settings work well, but let’s go through some key choices:

When asked about adjusting your PATH environment, select “Git from the command line and also from 3rd-party software”. This is usually the middle option and is what you’ll want in most cases.

For the SSH executable, stick with the default “Use bundled OpenSSH”.

For HTTPS transport backend, the default “Use the native Windows Secure Channel library” is fine.

When it comes to line ending conversions, choose “Checkout Windows-style, commit Unix-style line endings”. This option plays well with cross-platform projects.

For the terminal emulator, go with “Use MinTTY”, which is the default option.

For the default behavior of git pull, stick with “Default (fast-forward or merge)“.

For the credential helper, select “Git Credential Manager”.

In the extra options, enable “Enable file system caching” and “Enable symbolic links”.

After you’ve made these selections, proceed with the installation. Git will now install on your system.

To verify that Git has been installed correctly, open your Command Prompt (you can search for “cmd” in the Start menu) and type:

git --version

You should see a response with the Git version number, confirming that Git is now installed on your Windows machine.

Next, you’ll want to set up your identity. Git needs to know who you are when you’re making commits. Set this up by running these commands in the Command Prompt:

git config --global [user.name](http://user.name/) "Your Name"
git config --global user.email "[[email protected]](mailto:[email protected])"

Replace “Your Name” and “[email protected]” with your actual name and email address.

If you’re using Visual Studio Code, you can set it as your default Git editor with this command:

git config --global core.editor "code --wait"

This will open VS Code whenever Git needs you to enter a commit message.

That’s it! You’ve now successfully installed Git on your Windows machine and set up the basic configuration.

Check out my Git Cheat Sheet on freeCodeCamp, and download the PDF version from https://flaviocopes.com/access

I wrote 17 books to help you become a better developer, download them all at $0 cost by joining my newsletter

JOIN MY CODING BOOTCAMP, an amazing cohort course that will be a huge step up in your coding career - covering React, Next.js - next edition February 2025

Bootcamp 2025

Join the waiting list