Skip to content

Instantly share code, notes, and snippets.

@cicorias
Last active April 11, 2019 13:39
Show Gist options
  • Save cicorias/b680feacab1d7b29589181d5a51e41b2 to your computer and use it in GitHub Desktop.
Save cicorias/b680feacab1d7b29589181d5a51e41b2 to your computer and use it in GitHub Desktop.
git status
git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1
cat ~/.bashrc <<EOF
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
GIT_PROMPT_ONLY_IN_REPO=1
source $HOME/.bash-git-prompt/gitprompt.sh
fi
EOF
wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
export GIT_PS1_SHOWCOLORHINTS=1
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUPSTREAM=auto
export GIT_PS1_SHOWCOLORHINTS=1
#$export GIT_PS1_STATESEPARATOR="|"
source ~/.git-prompt.sh
#PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
export PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment