Vovy checks whether the commit was pushed, then undoes it the safe way: a soft reset if local, a revert commit if others may already have it.
I committed the wrong thing, undo my last commit but keep the changes
How it works
- Look at the last commit: Vovy shows the commit's message and changed files as a diff card, so you confirm it is the one to undo.
- Check if it was pushed: Vovy compares your branch with GitHub. Undoing a pushed commit needs a different, safer method.
- Undo a local commit: If it is only on your Mac, Vovy runs git reset --soft HEAD~1, which removes the commit but keeps every change staged.
- Revert a pushed commit: If it is on GitHub, Vovy runs git revert, which adds a new commit that cancels the old one, so no history is rewritten.
- Confirm your files are safe: Vovy runs git status and shows a card of your changes still in place, ready to recommit correctly.
What you provide
- The repo with the bad commit
- Which commit to undo
What you get
- The commit undone
- Your changes kept
- No broken history on GitHub
- Reset vs revert explained
FAQ
What is the difference between reset and revert?
Reset moves your branch back as if the commit never happened. Revert adds a new commit that undoes it, which is safe for shared branches.
I just want to fix the commit message.
If it is not pushed, git commit --amend changes the message. Vovy can do that instead.
Can I lose work doing this?
git reset --hard can. Vovy uses --soft, which keeps every change on disk.
Related tasks
All tasks