contrib/git-sync: add atomic checkout