Skip to content

Instantly share code, notes, and snippets.

@sourabh-upadhyay
Last active May 24, 2017 11:19
Show Gist options
  • Save sourabh-upadhyay/589f26ee92b351fa9c4110e04d11787e to your computer and use it in GitHub Desktop.
Save sourabh-upadhyay/589f26ee92b351fa9c4110e04d11787e to your computer and use it in GitHub Desktop.
Show git branch name on ubuntu terminal/console
## Show current git branch on terminal
#### Add this line of code at the end on file *.bashrc* in Home directory
export GIT_PS1_SHOWDIRTYSTATE=1
export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[00;31m\]$(__git_ps1)\[\033[00;34m\] \$\[\033[00m\] '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment