set head to commit, not short prefix