Fix bash git branch for detatched head

This commit is contained in:
Talia 2018-11-19 21:20:55 +01:00
parent 3ed66ecb4e
commit f7f7d59d09
1 changed files with 4 additions and 0 deletions

4
bashrc
View File

@ -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"