Created
April 20, 2011 20:23
-
-
Save btv/932742 to your computer and use it in GitHub Desktop.
Show git branch in bash prompt
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
# Show the git branch in the prompt | |
PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' | |
#this also works for SVN version numbers & HG branches too. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment