Skip to content

Instantly share code, notes, and snippets.

@Juke34
Created May 27, 2021 15:29
Show Gist options
  • Save Juke34/5459f9bc1782bbabad6a30c418473aa5 to your computer and use it in GitHub Desktop.
Save Juke34/5459f9bc1782bbabad6a30c418473aa5 to your computer and use it in GitHub Desktop.
First copy this file: https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh
Then add in the bashrc the following lines:
source /path/to/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWUNTRACKEDFILES=true
GIT_PS1_SHOWSTASHSTATE=true
GIT_PS1_SHOWUPSTREAM="auto"
GIT_PS1_SHOWCOLORHINTS=true
export PS1="${debian_chroot:+($debian_chroot)}\[\033[0;32m\]\T\[\033[00m\]:\[\033[0;35m\]\w\[\033[0;36m\]\$(__git_ps1) \[\033[00m\]\$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment