Skip to content

Instantly share code, notes, and snippets.

@aceakash
Last active August 29, 2015 14:03
Show Gist options
  • Save aceakash/08f15650a4231e65fb96 to your computer and use it in GitHub Desktop.
Save aceakash/08f15650a4231e65fb96 to your computer and use it in GitHub Desktop.
Show current git branch in Bash
# Open ~/.bashrc and add the following lines
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
export GIT_PS1_SHOWDIRTYSTATE=1
export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment