Git comes with a handy shell script that could be used to display the actual branch name within the bash. This could protect you from doing the right stuff with the wrong branch.
If you've installed git via a package manager the script itself is installed to "/etc/bashcompletion.d/git" and all you have to do is to add the following lines either to your local bashprofile or the global version of your system:
# Show current Git branch on bash prompt
After a relogon your PS1 should be extended as soon as you are in directory which is under version control by git. This will look similar to this:
On Mac OSX
If you have installed the Git version that is provided by Apple you can add the following to your ~/.bash_profile: