Installing Git on Windows

Installing Git on Windows is very similar to installing it on Linux. That might not come as a surprise though because the tools we’ll be using in this post are specifically designed to allow Windows users to utilise Linux packages without needing to install a VM.


The first thing you’ll need to do is download Git for Windows. Once you have done that, install it using all of the default settings. After completing the installation, you will find that you’ve now got three Git applications:

  • Git Bash
  • Git CMD
  • Git GUI

The former two are ways to access Git (and a few other Linux packages) through the CLI. “Git GUI” is, as its name suggests, a GUI for Git. I recommend always using “Git Bash” as it provides a better experience than “Git CMD” and because the “Git GUI” does not provide the level of flexibility that the CLI does.

Generating Windows SSH key

Issue the following command:

After providing responses to each of the questions, a certificates will be generated and stored in your C:\Users\<Username>\.ssh  directory. You will need to copy the contents of the  file located inside of this directory and paste it into your Git account’s repository.

Rather than navigating to the file through File Explorer though, you can do it through “Git Bash” using the following command:

Git on Cygwin

If you followed my “Installing Ansible on Windows” guide, you might find that you want to to use Git from within Cygwin. If you followed the steps above you can use the same certificate here.

Using the technique described in this StackOverflow answer, issue the following commands:


Following this guide allows you to use Git on Windows using any of the following methods:

  • Command prompt
  • Git Bash
  • Git CMD
  • Git GUI
  • Cygwin

In other words, you’re spoiled for choice :)

Knowledge Base

See the Git section of my Knowledge Base for more information.

As always, if you have any questions or have a topic that you would like me to discuss, please feel free to post a comment at the bottom of this blog entry, e-mail at, or drop me a message on Twitter (@OzNetNerd).

Note: This website is my personal blog. The opinions expressed in this blog are my own and not those of my employer.

Leave a Reply