maint/for-every-commit: Try git reset --hard
This fixes situations where a file is added, then later that same file is removed and replaced by autogeneration, in the same MR.
For example: !350 (comment 3032222) https://gitlab.torproject.org/nickm/rust-derive-adhoc/-/jobs/556879
############################## 5/13 ############################## | | commit 760f82825ea9a406f08eda9297383f5be7f83a7f | Author: Nick Mathewson <nickm@torproject.org> | Date: Fri May 17 08:42:28 2024 -0400 | | mdbook: use lowercase module names in tests. | + git checkout -q 760f82825ea9a406f08eda9297383f5be7f83a7f error: Your local changes to the following files would be overwritten by checkout: book/tests/src/chapters.rs Please commit your changes or stash them before you switch branches. Aborting Checkout failed, trying with git clean + git clean -xdff Removing cache/ Removing target/ + git checkout -q 760f82825ea9a406f08eda9297383f5be7f83a7f error: Your local changes to the following files would be overwritten by checkout: book/tests/src/chapters.rs Please commit your changes or stash them before you switch branches. Aborting *** Was not originally on a branch, HEAD changed! ***