Day: March 13, 2018

git | March 13, 2018

Add Git Branch Name to Shell Prompt

PS1=’\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\] @ \w\[\033[0;32m\]\n$(git branch 2>/dev/null | grep “^*” | colrm 1 2)\[\033[0;32m\]??\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\]\[\033[0m\] ‘ Credit: https://gist.github.com/justintv/168835