Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions atomic-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,29 +137,29 @@ atomic move config.toml src/config.toml

**Alias:** `atomic mv`

#### `atomic reset`
#### `atomic restore`

Reset the working copy to the last recorded state, discarding uncommitted changes.
Restore the working copy to the last recorded state, discarding uncommitted
changes (the working-copy counterpart of `git restore`). The legacy name
`atomic reset` is kept as an alias.

```bash
# Preview what would be reset
atomic reset --dry-run
# Restore specific files (no --force needed)
atomic restore src/main.rs

# Reset everything (requires --force)
atomic reset --force
# Restore everything (requires --force)
atomic restore --force

# Reset specific files
atomic reset src/main.rs

# Reset to a different stack's state
atomic reset --stack main
# Preview a single file's pristine content
atomic restore --dry-run src/main.rs
```

| Option | Description |
|--------|-------------|
| `--force` | Required to confirm destructive reset |
| `--force` | Required only for a whole-tree restore |
| `--dry-run` | Preview without making changes |
| `--stack <NAME>` | Reset to a specific stack's state |

To switch views, use `atomic view switch <view>`.

---

Expand Down
4 changes: 2 additions & 2 deletions atomic-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub mod log;
pub mod mv;
pub mod record;
pub mod remove;
pub mod reset;
pub mod restore;
pub mod revise;
pub mod split;
pub mod stash;
Expand Down Expand Up @@ -138,7 +138,7 @@ pub use query::Query;
pub use record::Record;
pub use remote::Remote;
pub use remove::Remove;
pub use reset::Reset;
pub use restore::Restore;
pub use revise::Revise;
pub use split::Split;
pub use stash::Stash;
Expand Down
Loading
Loading