Use git checkout -f instead of --force, for better compatibility with git 1.5
Only call update_references if we don't have the ref, and if it is a tag or branch. Commit SHA1's don't change or collide, so if we have it, we have it.