brew and git versions

Today I faced something weird:

byte@lovegood~$ brew update
error: RPC failed; result=22, HTTP code = 400
fatal: The remote end hung up unexpectedly
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

I ran the brew doctor to find out my git version was outdated. Turns out you need “Git 1.7.10 or newer is required to perform checkouts over HTTPS from GitHub.” I had! Upgraded it to now and all is well.