| sidebar_position | 8 |
|---|---|
| title | diff |
Show differences in the working copy.
atomic diff [OPTIONS] [FILES]...The diff command displays the differences in your working copy—the changes between the files you're editing and the last recorded state in the view. This helps you review changes before recording them.
By default, diff shows all modified tracked files. You can limit the output to specific files, compare against a particular change or view, choose a diff algorithm, and control the output format.
Specific files to diff. When omitted, all modified tracked files are shown.
# Diff a single file
atomic diff src/main.rs
# Diff multiple files
atomic diff src/main.rs src/lib.rs Cargo.tomlCompare against a specific change hash or prefix.
atomic diff --change ABCD1234Diff algorithm: myers or patience. Default is myers.
# Use the Patience algorithm
atomic diff --algorithm patienceNumber of context lines to show around changes. Default is 3.
# Show 5 lines of context
atomic diff --context 5
# Show minimal context
atomic diff --context 1Show only a stat summary.
atomic diff --statDisable colored output.
atomic diff --no-colorShow only names of changed files.
atomic diff --name-onlyShow names with status indicators (M/A/D).
atomic diff --name-statusShort output format (equivalent to --name-status).
atomic diff --shortInclude untracked files in the output. By default, only tracked files are shown.
atomic diff --short --untrackedView to compare against.
atomic diff --view feature-branchEnable token-level diff highlighting (CRDT-powered).
atomic diff --word-diffEmit extra diagnostic output.
atomic diff --verbosePrint help.
Print version.
# Show all changes in the working copy
atomic diff
# Show changes in a specific file
atomic diff README.md
# Show changes in multiple files
atomic diff src/main.rs src/lib.rs# More context lines
atomic diff --context 10
# Disable color (for piping)
atomic diff --no-color
# Stat summary only
atomic diff --stat
# Short format for scripting
atomic diff --short
# Include untracked files
atomic diff --short --untracked
# Token-level highlighting
atomic diff --word-diff# Default Myers algorithm
atomic diff --algorithm myers
# Patience algorithm (better for refactoring)
atomic diff --algorithm patience# Compare against a specific change
atomic diff --change ABCD1234
# Compare against another view
atomic diff --view feature-branch# Make changes
echo "New content" >> file.txt
# Review changes
atomic diff
# Record if satisfied
atomic record -m "Update file"atomic record- Record changes after reviewing with diffatomic add- Add files to track their changesatomic change- View diffs of recorded changesatomic log- View history of changesatomic restore- Discard working copy changes