2 ms·
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 spa
by Groxx 15y ago
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?
- telemachos 15y agoMy 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://cl.ly/8yN8
- Groxx 15y agoooh, very nice. Prior to this & your other reply, I hadn't seen anything using the __git functions. Everyone uses sed. Thanks!