A Better Bash+Git Prompt

I enjoy a souped-up Bash prompt which radiates information about (for example) the branch I am on, in addition to the usual information (current directory). There are countless examples online, but the nicest I’ve found so far is this one from Martin Gondermann. I have it set to show just a little information:

bash-prompt-with-git-info

Martin shows a more sophisticated example, along with an explanation of the Git-related decorations, as shown:

bash-prompt-explanation

Whether you prefer this one or any of the other similar tools, it’s worth the few minutes to upgrade your prompt from “$”.