repo: Reset checkout when retrying sync

If the first 'repo sync' call fails, run
'repo forall "git reset --hard HEAD"' before retrying 'repo sync'.

Bug: 345
Change-Id: If4759b8f3714fc1221c67774ca7ca45d20278221
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/38340
Reviewed-by: Oliver Newman <olivernewman@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
4 files changed