Skip to main content
Lets you jump back to an older version of the project, either briefly or permanently.

Usage

Arguments

Options

Finding a save ID

Use ag info to see the save history. Each save has a short ID like abc1234 or def5678. That’s the “commit” you use with goto.

Temporary visit (default)

The default mode. You peek at an old version, and when you press Enter, you come back:
What happens:
  1. Any unsaved changes are put aside (safe and sound)
  2. You’re taken to the old version
  3. You can look around, check files, etc.
  4. Press Enter to return to where you were
  5. Your unsaved changes come back automatically

Stay on the old version

If you want to look around without auto-returning:
What happens:
  1. You’re taken to the old version
  2. You stay there until you run ag goto HEAD
  3. Your unsaved changes are put aside temporarily
To get back:

Permanently roll back (—reset)

If you want to make the old version the current version:
Warning: This is destructive! Anchor4Git will ask you to confirm. What happens:
  1. Any unsaved changes are auto-saved first
  2. Your workspace is replaced with the old version
  3. A new save is created called “RESET of: [old save message]”
  4. You can keep working from this point

Return to HEAD

To come back to the latest version from a --stay session:
HEAD is a special word that means “the latest save.”

Preview mode

To see what would happen:
Shows the commit details, whether reset mode is on, and whether stay mode is on.

Examples

Last modified on July 16, 2026