Free tools

How do I undo this in git?

Pick what happened. See a picture of your commits before and after the fix, how risky it is, and the exact commands to copy. Or hand it to your AI agent with one prompt.

Free from Darnly. Spot a bug in the app you're building? Darnly hands it to Claude Code, Codex or Cursor in one key.Add to Chrome

Before
After

        More free tools

        See all 89 tools

        How it works

        1. Pick what happened, in plain words, or search for it: “wrong branch”, “.env”, “conflict”, “reset”.
        2. See it on a picture: your commits and branches before, and what they look like after the fix. The badge says how risky it is: safe, be careful, or destroys work.
        3. Copy the commands one by one, or copy a prompt that asks Claude Code, Cursor or Codex to do it for you, safely, with a backup first.

        Questions

        Where do I type these commands?

        In a terminal opened in your project folder. In Cursor or VS Code: Terminal, then New Terminal. On a Mac you can also use the Terminal app and cd into the folder first. Or skip the terminal: click “Copy prompt for your AI agent” and paste it into Claude Code, Cursor or Codex.

        What do the badges mean?

        Safe: nothing can be lost. Be careful: it rewrites history or moves a branch, so read the note, and don’t do it on commits you’ve already pushed unless it says so. Destroys work: uncommitted changes are deleted for good, and git can’t bring them back.

        What is a commit id and where do I find it?

        Every commit has an id like 1a2b3c4. Run git log --oneline and it’s the short code at the start of each line. Replace <commit-id> in a command with it.

        What does HEAD~1 mean?

        HEAD is where you are now. HEAD~1 is one commit before that, HEAD~2 is two before, and so on.

        I already pushed. Does that change anything?

        Yes. Commits on GitHub may already be on other people’s computers or deployed. Don’t rewrite them with reset or amend: use “Undo a commit I already pushed” (git revert), which adds a new commit that cancels the old one. Never fix a rejected push with git push --force.

        Can I really get back “lost” commits?

        Usually, yes. Git keeps commits that are no longer on any branch for a few weeks, and git reflog lists everywhere you’ve been. Uncommitted changes are different: if they were never committed or stashed, git never saved them.

        Does this tool see my code?

        No. It’s a guide, not a connection to your repo. Everything runs in your browser and nothing is uploaded.