Skip to content

Instantly share code, notes, and snippets.

@relaxdiego
Created March 11, 2014 20:00
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 relaxdiego/9493817 to your computer and use it in GitHub Desktop.
Save relaxdiego/9493817 to your computer and use it in GitHub Desktop.
# git completion
source /usr/local/etc/bash_completion.d/git-completion.bash
source /usr/local/etc/bash_completion.d/git-prompt.sh
# unstaged (*) and staged (+) changes
# export GIT_PS1_SHOWDIRTYSTATE=1
# If something is stashed, then a '$' will be shown next to the branch name
# export GIT_PS1_SHOWSTASHSTATE=1
# If there're untracked files, then a '%' will be shown next to the branch name
# export GIT_PS1_SHOWUNTRACKEDFILES=1
# A "<" indicates you are behind, ">" indicates you are ahead, and "<>"
# indicates you have diverged.
# export GIT_PS1_SHOWUPSTREAM="verbose"
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
NORMAL="\[\033[m\]"
PS1="$GREEN\W$YELLOW\$(__git_ps1)$NORMAL $ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment