Source control | How to revert?

Cursor doesn’t have a dedicated “Revert” button in its source control graph that I’ve seen. Work-around, depending on what you want to do…

Reset to a commit (Discards changes entirely)
git reset --hard <commit-id>

This will reset your branch to the specified commit, discarding all uncommitted changes.

OR

Checkout a specific commit in detached mode (Temporary state without affecting history)

git checkout <commit-id>

You’ll be in “detached HEAD” mode. You can explore or save this state by creating a new branch if needed.

OR

Revert a commit (Creates a new commit that undoes the changes from a specific commit)

git revert <commit-id>

if you only want to undo a specific commit but keep the rest of your changes intact…

OR ask the AI tell it what you want to do or have happen and it’ll create the commands for you.

Hope that helps