All I git

Here’s everything I know about git without having to google. It isn’t much. When I first setup git on a new OSX machine, I edit my .bash_profile and add the following lines: export PS1='$(git branch &>/dev/null; if [ $? -eq 0 ]; then \ echo "\[\e[0;32m\][GIT: \[\e[0;31m\]$(basename `pwd`); \[\e[0;33m\]$(git branch | grep ^*|sed s/\*\ //) \ $(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; if [ "$?" -eq "0" ]; then \ echo "\[\e[0;32m\]clean"; else \ echo "\[\e[0;31m\]dirty"; fi)\[\e[0;32m\]] \$ "; else \ echo "\[\e[0;31m\][\w]\[\e[m\] \$ "; fi) \[\e[0m\]' I can’t following everything going on in that bit of bash but I don’t need to and neither do you.