7

I'm git bisecting a Unity3D repository and every time I open the Unity3D editor to check if the current revision is good or bad, Unity3D dirties a few files, forcing me to do a hard reset before continuing with the bisection.

This is because if I don't reset, I'll get:

error: Your local changes to the following files would be overwritten by checkout:
        Platform/Assembly-CSharp.csproj
        Platform/ProjectSettings/ProjectSettings.asset
Please commit your changes or stash them before you switch branches.
Aborting

Is there any way to tell git bisect to use --force in its checkout call or otherwise avoid having to reset every single time?

AnLog
  • 796
  • 1
  • 7
  • 15
  • 4
    I guess as workaround you could set a custom command alias (if on linux/unix) like e.g. `alias gitbi='git reset --hard; git bisect`, then you could use `gitbi bad` and `gitbi good` to tag the revisions (while automatically cleaning the repo before-hand so that the autom. checkout can succeed). – Jay Jul 17 '20 at 15:23
  • @Jay That's not a bad idea. And one that simply didn't occur to me. If I don't get any better answers feel free to post that as an answer and I'll accept it. – AnLog Jul 17 '20 at 15:55

0 Answers0