Git Bash vs. Power Shell

git-for-windowsFor programmers used to developing on Linux, Windows is an incredibly unfriendly programming environment. What is the best way to create a Linux programmer friendly developer environment on Windows?

In the past, the best way to create a Unix like development environment on Windows was by installing cygwin. Unfortunately, cygwin is not Windows, and software developed in it requires the cygwin DLLs to be installed on the target machine. This led to the development of MinGW (minimal GNU for Windows), a package of GNU utilities that can run natively on Windows, along with a port of the GNU bash shell.

Microsoft has release their own shell, the PowerShell. It has some attractive features, but is completely different from bash. While looking for a solution to provide git in PowerShell, I came across Git for Windows, which offers git bash, a Windows command tool that runs the MinGW bash shell. This seems to be a better solution than PowerShell if you are coming from a Linux development background.

The following document describes how to add new utilities to git bash: How to add more to Git Bash on Windows. I intend to try to use git bash as my development environment on Windows, and will try to update this post and make new posts describing what I’m doing and how it works out.

First thing I need is a C compiler. The MinGW 64 installer can be found (and downloaded from) here: It is straightforward to install. Before it will be usable from Git Bash, you need to add it to the path:

  1. Open the Control Panel. If your using Classic Shell, click Start and select Programs/Windows System/Control Panel
  2. Click System and Security
  3. Click on Environment Variables.
  4. Double Click on System variables > Path
  5. Add C:\Program Files (x86)\mingw-64\i686-7.3.0-posix-dwarf-rt_v5-rev0\mingw32\bin to the Variable value

Open  a new git bash shell. You should be able to run: gcc –version


About jimbelton

I'm a software developer, and a writer of both fiction and non-fiction, and I blog about movies, books, and philosophy. My interest in religious philosophy and the search for the truth inspires much of my writing.
This entry was posted in tools and tagged , , , , , . Bookmark the permalink.

1 Response to Git Bash vs. Power Shell

  1. Pingback: Windows 10 for People Who Hate Windows | Jim's Jumbler

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s