Run Sublime Text 2 and login to mysql with git bash on Windows 7

January 11, 2013

How about that for a title:-) Anyway I’m back on Windows and needed the git bash to open Sublime Text 2 and login to mysql (under Xampp) from the git bash. Since I couldn’t find any info online on how to do this I decided to write a short post on how you can accomplish this yourself. First off if you have git and the git bash you need to either create or edit your .bash_profile. If it’s a new install of the git bash then you’ll need to create this file within your favorite text editor. In that file copy and paste my code

alias subl=”/c/Program\ Files/Sublime\ Text\ 2/sublime_text.exe”
function mysql(){
cd /c/xampp/mysql/bin/;
mysql.exe -u root -p;

and presto chango you can login to mysql from your git bash by typing in “mysql” or you can open up a directory in sublime text 2 by typing “subl . &”

Tags: ,