We should probably stop if there are any important modifications, to avoid extra files that can't be recreated from the repo. Could also do this in another copy like
export GIT_DIR=$(realpath $(git rev-parse --git-dir)); cd $(mktemp -d); git checkout -f; ls