Created
September 7, 2011 00:20
-
-
Save burnto/1199387 to your computer and use it in GitHub Desktop.
bash_profile git status in 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
| # GIT COMPLETION | |
| # (from https://github.com/git/git/blob/master/contrib/completion/git-completion.bash) | |
| source ~/.git-completion.sh | |
| # BASH PROMPT WITH GIT BRANCH | |
| # Set the base PS1 | |
| # PS1="\u:\h \W$ " | |
| PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 " \[\033[01;35m\](%s)\[\033[0m\]")$ ' | |
| export GIT_PS1_SHOWDIRTYSTATE=1 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
super useful. only shows up when i'm cd'd into in a git project directory.