Before installing stuff, always run

apt-get update
git
apt-get install git-core