clone.sh: properly set HEAD on initial clone