Now that I’m using git all the time, it’s helpful to have bash show me what branch I’m on, and whether the working directory is dirty. I found a gist by Henrik Nyh that does just this. I souped it up a little bit to be more efficient and handle a few extra situations. Here’s the result: [EDIT: I have updated this gist since this post was made; the current version is based on git-completion.sh in the git distribution]
Please use it if you like, and fork the gist if you make any improvements!