Skip to content

Instantly share code, notes, and snippets.

@shazron
Created September 28, 2011 01:08
Show Gist options
  • Select an option

  • Save shazron/1246741 to your computer and use it in GitHub Desktop.

Select an option

Save shazron/1246741 to your computer and use it in GitHub Desktop.
Git Bash Completion (install git and bash-completion using homebrew)
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
GIT_PS1_SHOWDIRTYSTATE=1 #... untagged(*) and staged(+) changes
GIT_PS1_SHOWSTASHSTATE=1 #... if something is stashed($)
GIT_PS1_SHOWUNTRACKEDFILES=1 #... untracked files(%)
PS1='\h:\W \u$(__git_ps1 " \[\e[0;32m\](%s)")\[\e[1;37m\]$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment