Created
October 15, 2014 04:07
-
-
Save jimbeaudoin/b612c9ccdd3fcc3d427d to your computer and use it in GitHub Desktop.
Show BranchName, DirtyState and UntrackedFiles for Git 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
# Download this File: | |
# https://github.com/git/git/blob/8976500cbbb13270398d3b3e07a17b8cc7bff43f/contrib/completion/git-prompt.sh | |
source ~/.git-prompt.sh | |
# Show Dirty(*,+) and Untracked(%) Files | |
GIT_PS1_SHOWDIRTYSTATE=1 | |
GIT_PS1_SHOWUNTRACKEDFILES=1 | |
# Update Bash Prompt | |
PS1='\u@\h:\W$(__git_ps1 " (%s)")\$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment