Last active
August 13, 2023 18:27
-
-
Save uberhacker/1e878df8943626e186f13297e75f4b6f to your computer and use it in GitHub Desktop.
Bash git prompt with colors inspired by https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh
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
# Enable git prompt. cd && curl -Ls -o .git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh | |
source ~/.git-prompt.sh | |
GIT_PS1_SHOWDIRTYSTATE=yes | |
GIT_PS1_SHOWSTASHSTATE=yes | |
GIT_PS1_SHOWUNTRACKEDFILES=yes | |
GIT_PS1_SHOWUPSTREAM=auto | |
GIT_PS1_DESCRIBE_STYLE=default | |
GIT_PS1_SHOWCOLORHINTS=yes | |
PS1='\[\033[1;34m\]\u@\H \[\033[1;33m\]\w \[\033[1;31m\]$(__git_ps1 "(%s)")\[\033[0m\]\$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment