generate-git-snapshot: when checking out from a $branch then use origin/$branch

Only git versions >=1.7.8 seem to handle this automatically by default,
otherwise the checkout won't work if the given $branch hasn't be checked
out 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 bug report and diagnosis