Skip to main content

atomic revise

Revise a change in-place without losing its position in the stack.

Synopsis

atomic revise [<REF>] [OPTIONS]

Description

The revise command modifies a previously recorded change. Unlike Git's commit --amend which only works on HEAD, Atomic can revise any change in the stack. The change keeps its position — subsequent changes are automatically re-applied on top.

This is useful for fixing typos, updating commit messages, or making corrections to recent changes without rewriting history.

Arguments

ArgumentDescriptionDefault
<REF>Reference to the change to revise. Supports @ (last), @~1 (previous), @~N (N back), or a hash prefix.@ (most recent)

Options

OptionDescription
-m, --message <TEXT>New message for the change
--rewordOnly change the message, don't include working copy changes
--no-editKeep existing message, only update content
--dry-runShow what would happen without making changes

How It Works

When you revise a change that isn't the most recent, Atomic performs these steps internally:

Before:  [A] ← [B] ← [C] ← @

want to revise

Step 1: Unrecord @ (C saved as pending)
[A] ← [B] ← @

Step 2: Unrecord @ (B is now the target)
[A] ← @ working copy has B's changes

Step 3: User edits files (or just message with --reword)
Record as B'
[A] ← [B'] ← @

Step 4: Re-apply pending (C)
[A] ← [B'] ← [C] ← @

After: B has been revised to B', C re-applied on top

Because Atomic uses patch theory, re-applying subsequent changes is mathematically sound — independent changes commute cleanly.

Examples

Revise the last change

# Edit files, then revise the most recent change
atomic revise

Fix a commit message

# Change only the message
atomic revise --reword -m "Better description of what changed"

Revise a previous change

# Revise the change before the most recent
atomic revise @~1

# Revise two changes back
atomic revise @~2 -m "Updated message"

Preview what would happen

atomic revise @~1 --dry-run

Differences from Git

AspectGitAtomic
What can be amendedOnly HEAD (--amend)Any change in the stack
History rewritingRewrites commit SHAsPreserves graph structure
Rebasing neededYes, for non-HEAD changesNo, changes re-apply automatically
ConflictsPossible during rebaseOnly if changes aren't independent

See Also

  • record — Recording new changes
  • log — Viewing change history
  • reset — Discarding working copy changes
  • change — Inspecting change details