Skip to content

Instantly share code, notes, and snippets.

@JamesChevalier
Created September 6, 2012 13:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamesChevalier/3656343 to your computer and use it in GitHub Desktop.
Save JamesChevalier/3656343 to your computer and use it in GitHub Desktop.
Custom Bash Prompt
# unstaged (*) and staged (+) changes will be shown next to the branch name
GIT_PS1_SHOWDIRTYSTATE="."
# if there are untracked files (%) will be shown next to the branch name
GIT_PS1_SHOWUNTRACKEDFILES="."
# if something is stashed ($) will be shown next to the branch name
GIT_PS1_SHOWSTASHSTATE="."
# you are behind (<), you are ahead (>), or you have diverged (<>)
GIT_PS1_SHOWUPSTREAM="auto"
# White brackets, yellow path, blue branch name, and cyan dollar sign
# [~/working/path (branch-name-with-indicator)]$
PS1='[\[\033[0;33m\]\w\[\033[0;34m\]`__git_ps1`\[\033[0m\]]\[\033[0;36m\]\$ \[\033[0m\]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment