Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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
You can’t perform that action at this time.