In my case, just installing git through Macports solved my problem. I believe this problem was probably caused by outdated installations (possibly Mac OS X git Installer). If you are in this scenario, first install Macports:
http://www.macports.org/install.php
Then, once Macports is installed (with the correct version for your OS), run:
sudo port install git-core +svn
After that, I just had to use git in the new location set by Macports:
/opt/local/bin/git
I changed my PATH variable so that it is used by default git.
source share