Integrating the Git bash into Console

One of the essential development tools (found on Hanselman’s tools list) is a better command shell.  The regular “cmd.exe” that comes with every version of Windows is quite lame.  Console offers a host of improvements over the build-in command prompt, not least of which is the tabbed interface, allowing me to have one Console window with tabs for different directories/shells.

Another cool feature of Console is that you can host different shell configurations.  And since the git bash is build on top of cmd.exe, it’s pretty straightforward to plug the git bash into Console.

First things first, make sure you have msysgit installed.  You can find the installation instructions from Jason’s Git for Windows Developers series.  Next, you’ll need to install Console, which you can download from the SourceForge site.

After launching Console, we’ll need to add a new tab launcher by navigating to Edit->Settings:


In the Settings window that pops up, click the “Tabs” section, then the “Add” button to add a new Tab:


This will bring up the settings for the new tab you created.  In the configuration options in the “Main” tab below, I use the following settings (without quotes):

  • Title: “git bash”
  • Icon: “C:Program Files (x86)Gitetcgit.ico”
  • Shell: “C:Program Files (x86)Gitbinsh.exe –login –i”
  • Startup dir: “C:dev”

I installed Git to the “C:Program Files (x86)Git” directory, so this might be different on your machine.  The Icon setting is not necessary, but it’s nice to see the Git icon in a tab for differentiation.  Click “OK” and you can now create a new Git tab:

image </p> </p>

You now have a git bash in a tabbed interface, letting you keep multiple git bashes/command prompts around at once in a nice tabbed interface:


You can add tabs for other kinds of command prompts, such as the Visual Studio command prompt (with the correct PATH variables set) and so on.  Next up is trying out posh-git

Strengthening your domain: Avoiding setters