Skip to content

Instantly share code, notes, and snippets.

@Sekiphp
Created May 23, 2022 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sekiphp/6c60e91152b5430fa5995261b533edf7 to your computer and use it in GitHub Desktop.
Save Sekiphp/6c60e91152b5430fa5995261b533edf7 to your computer and use it in GitHub Desktop.
Put to ~/.bashrc
# GIT bash integration
if [[ -e /usr/lib/git-core/git-sh-prompt ]]; then
source /usr/lib/git-core/git-sh-prompt
export GIT_PS1_SHOWCOLORHINTS=true
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export GIT_PS1_SHOWUPSTREAM="auto"
# use existing PS1 settings
PROMPT_COMMAND=$(sed -r 's|^(.+)\\\$\s*$|__git_ps1 "\1" "\\\\$ "|' <<< $PS1)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment