Check that head_commit exists