Last Updated: February 20, 2016
·
2.23K
· tferreira

Killer shell prompt to use with Git

Add this in your ~/.bashrc file :

export GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1 GIT_PS1_SHOWSTASHSTATE=1
export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '

This will make your life easier.
Lots of colours... shows current branch, status for changes, stashed files, untracked files, staged files...