Homebrew has a formula for git-annex.

Warning: Homebew enables telemetry by default, which is not a good practice. If you are surprised by it doing this, see here and you may want to run brew analytics off.

Homebrew users can simply run brew install git-annex to install git-annex.

buiding git-annex from sources

This is the old recipe for building git-annex from source, using packages from homebrew. Useful if you want a newer version than the version in homebrew.

brew install haskell-platform git ossp-uuid md5sha1sum coreutils gnutls libidn gsasl pkg-config libxml2
brew link libxml2 --force
cabal update
mkdir $HOME/bin
cabal install c2hs --bindir=$HOME/bin
cabal install gnuidn
cabal install git-annex --bindir=$HOME/bin