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\.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:

$ cat ~/.ssh/
NrRFi9wrf+M7Q== schacon@mylaptop.local

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:

nano ~/.ssh/config
    IdentityFile    /cygdrive/c/Users//.ssh/id_rsa


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 :)

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 Reddit (OzNetNerd).

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

Leave a comment