Skip to content

Instantly share code, notes, and snippets.

@Bouke
Created November 2, 2010 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bouke/660541 to your computer and use it in GitHub Desktop.
Save Bouke/660541 to your computer and use it in GitHub Desktop.
git branch styled in prompt
# 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