Last active
December 23, 2015 06:29
-
-
Save kevinmarx/6594480 to your computer and use it in GitHub Desktop.
Git flags for showing state in bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PS1="\e[36;40m\W\e[0m \e[35;40m\$(__git_ps1 ' (%s)') \e[0m\]\n\$ " | |
# for more info, http://git.kernel.org/?p=git/git.git;a=blob;f=contrib/completion/git-completion.bash;hb=HEAD | |
# __git_ps1 flags | |
# show * if there are untracked changes and + if staged and uncommitted changes | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
# show $ if there are stashed changes | |
export GIT_PS1_SHOWSTASHSTATE=1 | |
# show % if there are untracked files | |
export GIT_PS1_SHOWUNTRACKEDFILES=1 | |
# show < if there are unpulled changes, > if there are unpushed changes, or <> if there are both | |
export GIT_PS1_SHOWUPSTREAM=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment