Skip to content

Instantly share code, notes, and snippets.

@taz77
Created February 11, 2012 18:19
Show Gist options
  • Save taz77/1803405 to your computer and use it in GitHub Desktop.
Save taz77/1803405 to your computer and use it in GitHub Desktop.
Color Bash Prompt with Git Branch Information
# Set git autocompletion and PS1 integration
if [ -f /usr/share/doc/git-1.7.7.6/contrib/completion/git-completion.bash ]; then
. /usr/share/doc/git-1.7.7.6/contrib/completion/git-completion.bash
fi
GIT_PS1_SHOWDIRTYSTATE=true
PS1='\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment