Created
November 2, 2010 23:55
-
-
Save Bouke/660541 to your computer and use it in GitHub Desktop.
git branch styled in prompt
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
# if GIT_PS1_SHOWDIRTYSTATE is set to a nonempty value, | |
# unstaged (*) and staged (+) changes will be shown next to the branch name | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
# if GIT_PS1_SHOWSTASHSTATE is set to a nonempty value, | |
# a ‘$’ will be shown next to the branch name if something is stashed | |
export GIT_PS1_SHOWSTASHSTATE=1 | |
# if GIT_PS1_SHOWUNTRACKEDFILES is set to a nonempty value, | |
# a ‘%’ will be shown next to the branch name if there’re untracked files | |
export GIT_PS1_SHOWUNTRACKEDFILES=1 | |
# my fancy non disturbing prompt, listing the current git branch | |
export PS1='\[\033[37m\]\h\[\033[00m\]:\w\[\033[1;33m\]$(__git_ps1 "@%s")\[\033[00m\]$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment