News for hackers. Stuff that matters.
Re:Command Line Feedback from RVM and Git by Groxx on Tuesday August 02, 2011 @03:41PM (#2838436)
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
Re:Command Line Feedback from RVM and Git by Groxx on Tuesday August 02, 2011 @09:00PM (#2839364)
ooh, very nice. Prior to this & your other reply, I hadn't seen anything using the __git functions. Everyone uses sed. Thanks!