Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make Git Bisect do a force checkout or otherwise overwrite local changes

Tags:

git

git-bisect

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?

like image 447
AnLog Avatar asked Jun 01 '26 05:06

AnLog


1 Answers

After reading the source code, there is not a built-in way to do this.

I've submitted a patch (github) that adds this feature, hopefully it makes it into a release.

like image 156
kevmo314 Avatar answered Jun 02 '26 21:06

kevmo314



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!