Cursor: How I rollback multi-file changes

submited by
Style Pass
2024-10-25 19:30:06

Yay! Cursor is fun. All the way up until you accept some large multi-file change only to realize it was a mistake, but there’s no simple way to rollback.

After New Years 2022 I spent a couple days building dura. The tool is real simple, it just makes Git commits in a background thread to a branch you never see unless you go looking for it. Every time a file changes, it’ll make a commit.

So now, when I find myself wallowing in a Cursor-inflicted hell hole, I just pop open my git log (tig --all for those that partake), and roll back to the change just prior to my idiocy.

Back when I made it, tools like Cursor or Github Copilot didn’t exist. It was worth it to me simply just for that once-or-twice a year mistake where I royally mess up my repo. For example, last week I was writing a script and made changes a bit too fast and ended up deleting my whole working directory, including the script I was executing.

The beauty of dura is that you forget its there. It just silently does it’s thing until one day you desperately need it. It would be a terrible startup idea, so I released it open source.

Leave a Comment