Would `git reset --hard` have worked to in your case? I guess you want to have each babystep in a git commit, in the end you could do a `git rebase -i` if needed.
Without git I would have been screwed. AI doesn't commit anything, I do when I'm satisfied
One annoying thing about that flow is that when you change the world outside the model it breaks its assumptions and it loses its way faster (in my experience).
Bam, now it did git reset --soft [initial commit] and force pushed to origin