GrokGit: Launchy & Git Bash – Perfect Unison
As you know, I am aiming to master the command line with Git rather than the GUI. It’s no secret that GUI’s are inherently slow – and I am aiming to improve my productivity as much as possible so screw that!
What is Launchy?
Launchy is a great application that is VERY high up on my tools list. It allows you to create shortcuts to programs and URL’s so you can quickly access them. I would strongly recommend giving it a whirl.
Here is a quick rundown of my setup:
- WIN + ESC – Opens Launchy.
- I have two folders added to the “Catalogue”:
- A local folder for shortcuts specific to that machine (useful for programs that are work/home specific).
- A folder that is shared via Live Mesh which syncs to all my computers. Great for shared applications with common paths etc.
- From the Launchy Plugins I use:
- Weby to set location-specific favourites.
- Runner to set location-specific command line shortcuts.
“Runner” is the one that we are interested in at this point.
Setting Up Runner in Launchy to Run Git Bash
Pretty simple for this one:
- Open Launchy, right click > “Options” > “Plugins” > “Runner”.
- Click the “+” button to add a new item.
- Enter the following:
- Name “Git Bash”
- Program “C:\WINDOWS\system32\cmd”
(Obviously change the path as required to point to your Windows directory).
/c "pushd $$ && "C:\Program Files\Git\bin\sh.exe" --login -i"
(Again, alter the path as appropriate to point to your Git install) – Also note you need ALL of the above (including the “/c” and the quotation marks).
Using the New Shortcut
Now that we have created our Git runner, lets use it!
- Press WIN + ESC (or whatever your shortcut is to bring up Launchy).
- Type “Git” – “Git Bash” should appear or will appear in the dropdown if you have similarly-named items in Runner already (the reason I say only type “Git” is that Launchy remembers what you use).
- Press “TAB” – A small “>” should appear next to “Git Bash”.
- Start typing in the path to your “working folder” (the one with a “.git” directory in it). Notice you get the autocomplete support from Launchy.
- Hit “Enter” – BAM! The Git Bash prompts fires up, in your working directory and you are ready to rock and roll with source control! :D
Hope this little nugget comes in useful. I use it like 600 times a day* :)
* Yes, these figures are massively inflated, but I do use it a LOT.