I'm using something similar, but ran into a problem recently: go into a detached head mode (`git checkout HEAD^`). ALL your branches (local and remote) are spat out into your PS1. It's rare enough that I haven't looked into fixing it, but have any suggestions?
Re:Command Line Feedback from RVM and Git
by telemachos on Tuesday August 02, 2011 @04:53PM
(#2838661)
My suggestion is to use something more like this (provided by Git's bash-completion):
branch=$(__git_ps1 "%s")
That doesn't have any problem with detached head: http://cl.ly/8yN8
http://akhun.com/seo/skitch/Screen_Shot_2011-08-02_at_8.47.1...