Right click the link to save this file in your home directory with the name git-completion.bash.
Right click the link to save this file in your home directory with the name git-prompt.sh.
Follow the link to this gist and save the contents in your home directory under the name .bash_profile (note: if you alrady have a .bash_profile, add this to the bottom of it)