Can't install Git
You need to download the program, as it says in the guide a few lines above the code you are having a problem with.
git credential-osxkeychain # Test for the cred helper
# git: 'credential-osxkeychain' is not a git command. See 'git --help'.
curl -s -O http://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain # Download the helper
chmod u+x git-credential-osxkeychain # Fix the permissions on the file so it can be run
On OSX use Homebrew to install git
. Once you've installed homebrew with its simple one-liner command, then type these commands:
brew update
brew install git