Fix bash git branch for detatched head
This commit is contained in:
parent
3ed66ecb4e
commit
f7f7d59d09
1 changed files with 4 additions and 0 deletions
4
bashrc
4
bashrc
|
@ -49,6 +49,10 @@ git__prompt () {
|
|||
red='\033[01;31m'
|
||||
green='\033[01;32m'
|
||||
|
||||
if [ -z $branch ]
|
||||
then
|
||||
branch='#'`git rev-parse --short HEAD`
|
||||
fi
|
||||
if [ $branch = 'master' ]
|
||||
then
|
||||
echo -ne " \033[01;34m$branch"
|
||||
|
|
Loading…
Reference in a new issue