Exactly like I didn’t do anything super important - but I just tell agent “commit after successful build.

I think it would work with “commit before you want to delete stuff” the same way.