Updating and running Git through Homebrew instead of XCode
This: ~/.bash_profile is a file, not a directory. It's a file that gets executed when you start a bash login shell:


  A login shell is a bash shell that is started with - or --login.
  
  When BASH is invoked as a login shell, the following files are executed in the displayed order.
  
  
  /etc/profile
  ~/.bash_profile
  ~/.bash_login
  ~/.profile
  


To ensure your Homebrew-installed tools appear before any other tools you can copy and paste the following in to a terminal window to update your ~/.bash_profile file:

cat &lt;&lt; 'EOF' &gt;&gt; ~/.bash_profile

export PATH="/usr/local/bin:$PATH"
EOF


This will append (&gt;&gt;) the necessary lines to ~/.bash_profile for you in a safe manner. The append will create the file if it does not exist. The heredoc syntax used above is explained in this nice StackOverflow answer.

After making changes to your .bash_profile file you need to reload it or start a new Terminal session to see the change. To reload it in your existing session type:

source ~/.bash_profile