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:
- Any unsaved changes are put aside (safe and sound)
- You’re taken to the old version
- You can look around, check files, etc.
- Press Enter to return to where you were
- Your unsaved changes come back automatically
Stay on the old version
If you want to look around without auto-returning:
What happens:
- You’re taken to the old version
- You stay there until you run
ag goto HEAD
- 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:
- Any unsaved changes are auto-saved first
- Your workspace is replaced with the old version
- A new save is created called “RESET of: [old save message]”
- 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