Utility Git Bash Shortcuts

Big hat tip to sartorial exemplar John Fair for putting me on to this idea and sharing his set of default aliases.

If you use git bash for your typical interaction with git (and probably you should if you don’t because it behaves the same on all git platforms), adding a few shortcuts can dramatically cut down on the typing you need to do.

Open a git bash prompt.  From the prompt, open ~/.bashrc in your favorite editor.  Then paste these aliases into that file.

alias st2='/c/progra~1/sublim~1/sublime_text.exe'
alias fsi='/c/progra~2/mid3a6~1/v4.0/fsi.exe'
alias s='start '

#Change to base directory
alias ctb='cd /c/mysandbox'

#Git status--use this one all the time
alias gs='git status'

#Git checkout -- another one I use all the time
alias gche='git checkout'

alias ls='ls -alp '
alias ga='git add '
alias gb='git branch '
alias gche='git checkout '
alias gcom='git commit '
alias gcam='git commit -am '
alias gl='git log '
alias gpl='git pull '
alias gm='git merge '
alias gd='git diff '

You may notice that I have a shortcut for my favorite editor (Sublime Text 2) as well as an alias to bring up a F# Repl too.  I also have a utility alias to change to the root directory of my current development work.

Windows Live Writer 2012

Thanks to Scott Hanselman, I’m now writing this post with Windows Live Writer 2012.  For all of its miscues over the last couple of years, every now and again, Microsoft comes up with some modest piece of software which really hits it out of the park.  Live Writer is one such piece of software and I’m glad to see the Microsoft took the time to release a new version.

You’ll need to download the entire Windows Essentials 2012 package to get LiveWriter 2012 but it’s a minor inconvenience.