Skip to content

Instantly share code, notes, and snippets.

@twalker
Created March 3, 2011 02:03
Show Gist options
  • Save twalker/852179 to your computer and use it in GitHub Desktop.
Save twalker/852179 to your computer and use it in GitHub Desktop.
add git branch to bash prompt
# git prompt ( put in .profile or .bashrc)
export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '
export GIT_PS1_SHOWDIRTYSTATE=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment