Installing Git for Windows on a Windows Machine

Most operating systems come with a built-in terminal application. Windows comes with one named "Command Prompt" (also known as "cmd.exe"). Although I no longer use Windows machines on a regular basis, I hear the default Command Prompt is more of a hindrance than a help when attempting to use Unix commands and connect to remote Unix machines (ie: many web servers). So, in this video, I'll show you how to install and configure Git for Windows on a Windows machine.

There are a number of other popular terminal emulators for Windows, and you can search for those if you like, but I'm going to show you how to use Git for Windows because it comes with some features out of the box that will make your web development work easier. For example, it comes with some other helpful utilities like Git (which is already patched to work properly with Windows). This is definitely preferred over the default Windows bash, and will make your work with Unix based commands (as well as tools like Git, Drush and Unix web servers) more seamless.

  • You can download Git for Windows from their Github page. (If you've seen my videos on Drush you might remember that in those videos I recommend you use MSysGit. I haven't changed my mind, in fact Git for Windows is a fork of MSysGit by the same authors. They've decided to change the name to avoid some confusion they experienced and Git for Windows is the successor to MSysGit.)
  • Click "Download" on the page, and I'll just select "Run" to start the installer
  • When asked if I'd like to continue, I'll select "Yes"
  • Click “Next” five times (leaving everything at their defaults)
  • Then you'll be asked how you'd like to use Git. Since the Git for Windows application comes with Git, it needs to know how you'd like to use it. I'm going to select the first option. This option configures things so that you'll only be able to access Git through the Git Bash, and not the Windows Command Prompt. It is the safest choice, so I'll leave it selected and click “Next”
  • Then you'll be asked how you'd like to handle line endings. Since this is a Windows machine, and most servers run some form of Unix, I'm going to leave the default selected, for best compatibility and click “Next”.
  • Once the installation is complete, I'll uncheck the option to view the release notes, and click “Finish”

Now, since I'm running Windows 8, I'll open the Git bash by moving my mouse to the top right corner of the screen, then selecting the magnifying glass. Then I'll just type in "git" and select "Git Bash".

If you're on an older version of Windows, you can go to “All programs => Git” and click on “Git Bash”.

Alright, I am going to switch back to my mac environment for the remainder of this series, but now that you have a Unix compatible Bash installed, you should be all set to follow along.