Last active
August 29, 2015 14:03
-
-
Save aceakash/08f15650a4231e65fb96 to your computer and use it in GitHub Desktop.
Show current git branch in Bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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