Go back to an earlier commit

Use Back to this commit to return your files — or your branch — to an earlier point, with a preview of the result before anything changes.

When to use it

You want the project to look like it did at an earlier commit: to undo a series of changes, recover files, or start again from a known good state.

Steps

  1. Open All Commits and right-click the commit you want to go back to.
  2. Choose Back to this commit…
  3. Pick how the result should appear. The choices depend on whether the newer commits are already published — both cases are explained below.
  4. Check the preview, then confirm.
  5. If you created a restore commit, Push it like any other commit.
Back to this commit dialog showing restore choices and before and after graphs

If the newer commits are already published

Moving the branch back would rewrite history that other people may already have. RepoBeam avoids that by default and offers:

  • Restore as changes — the older files appear as unstaged Local Changes. The branch doesn’t move.
  • Restore staged — the same, but already staged.
  • Create restore commit — a new commit whose files match the older commit. Existing commits stay in history, and the new commit can be pushed normally.

If the newer commits are only on your computer

RepoBeam can move the branch back. You choose what happens to the newer work:

  • Keep as changes — the newer work stays as unstaged changes.
  • Keep staged — the newer work stays staged.
  • Discard file changes — the files match the older commit exactly.

RepoBeam shows how the branch will move and creates a private recovery point before rewriting anything.

Only want to undo one commit and keep everything after it? Right-click it and choose Undo with a new commit instead.