cd into the cloned git repo before running git checkout.