Use checkout -f preventing some potential issues

This commit is contained in:
Mikhail f. Shiryaev 2022-07-20 17:29:34 +02:00
parent 59501150d0
commit d100fac7ab
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -335,7 +335,7 @@ class Release:
yield
except (Exception, KeyboardInterrupt):
logging.warning("Rolling back checked out %s for %s", ref, orig_ref)
self.run(f"git reset --hard; git checkout {orig_ref}")
self.run(f"git reset --hard; git checkout -f {orig_ref}")
raise
else:
if with_checkout_back and need_rollback: