generate-git-snapshot: prepend "origin" when checking out a $branch

otherwise we might be checking out a branch which doesn't exist locally yet,
failing with:

| fatal: git checkout: updating paths is incompatible with switching branches.
| Did you intend to checkout '$BRANCH' which can not be resolved as commit?

Thanks: Stefan Schlesinger <sts@ono.at> for the bug report and testing