Ubuntu has a git-annex package, so to install simply run:

sudo apt-get install git-annex

backport

If the version shipped with Ubuntu is too old, the NeuroDebian team provides a standalone build package that is regularly updated and that should work across all releases of Ubuntu.