Last Updated: February 25, 2016
·
683
· applitect

Ubuntu adding git prompt

In order to get a good looking git prompt with Ubuntu 13.10, I had to see how they have changed the git autocomplete. Change your .bashrc and add the following lines at the end:

#GIT_PS1_SHOWDIRTYSTATE=1
#GIT_PS1_SHOWSTASHSTATE=1
#GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWUPSTREAM="auto"
GIT_PS1_SHOWCOLORHINTS=1
PROMPT_COMMAND="__git_ps1 \"$PS1\" \"\\\$ \""

Of course you can un/comment the git prompt behavior.

If you want color, you may have to uncomment the forcecolorprompt from within the .bashrc.