Git branch on the command prompt

This is a great way to show the working git branch on your terminal prompt:

Put the previous code on your .profile or .bash_rc file, then close and open the terminal and navigate to a git repository, you will see the current working git branch on the prompt