Last active
June 14, 2025 20:18
-
-
Save jmjf/1f0ccede11a900bb1d5d3816b55b1bae to your computer and use it in GitHub Desktop.
This file contains hidden or 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 GIT_PS1_SHOWCOLORHINTS=yes | |
| export GIT_PS1_SHOWDIRTYSTATE=yes | |
| export GIT_PS1_SHOWSTASHSTATE=yes | |
| export GIT_PS1_SHOWUPSTREAM=yes | |
| export GIT_PS1_SHOWCONFLICTSTATE=yes | |
| . ~/.git-prompt.sh | |
| if [ "$color_prompt" = yes ]; then | |
| PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 "(%s)") \$ ' | |
| else | |
| PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1 " (%s)") \$ ' | |
| fi |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this in
~/.git-prompt.sh. The comment at the top lists environment values you can set to configure flags.This prompt combines the example in the comment with the default Debian command prompt. If you prefer a different command prompt structure, the important part of
PS1is$(__git_ps1 "(%s)").Still not 100% happy with this. I want the branch name change color to indicate dirty state instead of needing to rely on the flag.