Add coloured name of git branch to bash prompt
Ruby Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.textile
bash_profile
git-ps.rb
git-ps.sh

README.textile

Why?

I tend to work on different projects simultaneously and always forget (a) what git branch I’m in for each project, and (b) if changes have to be committed. The code snippets in this repository add the current git branch name to the bash prompt; in green if the directory is clean, in red if it’s dirty. A screenshot can be found here