Last active
May 24, 2017 11:19
-
-
Save sourabh-upadhyay/589f26ee92b351fa9c4110e04d11787e to your computer and use it in GitHub Desktop.
Show git branch name on ubuntu terminal/console
This file contains 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
## 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