| sidebar_position | 7 |
|---|---|
| title | add |
Add files to be tracked.
atomic add [OPTIONS] [FILES]...The add command tells Atomic to start tracking files in the repository. Once added, files become part of the working copy and their changes will be included in future atomic record operations.
Unlike some version control systems, Atomic doesn't have a staging area. Files are either tracked or untracked:
- Tracked files: Monitored for changes, included in
recordoperations - Untracked files: Ignored by Atomic unless explicitly added
Files or directories to add to tracking. Paths are relative to the current directory or can be absolute.
# Add a single file
atomic add README.md
# Add multiple files
atomic add src/main.rs src/lib.rs
# Add a directory
atomic add src/
# Add everything in the current directory
atomic add .Add all untracked files in the repository.
atomic add --allDry run - show what would be added without doing it.
atomic add --dry-run src/Force add ignored files.
# Add a file that matches an ignore pattern
atomic add --force build/important-artifact.binRecursively add directory contents.
atomic add --recursive src/Don't recursively add directory contents.
atomic add --no-recursive src/Track empty directories explicitly.
atomic add --directory assets/These options are available on all commands:
-v, --verbose- Emit extra diagnostic output--no-color- Disable ANSI color in output-h, --help- Print help-V, --version- Print version
# Add a single file
atomic add README.md
# Add specific source files
atomic add src/main.rs src/lib.rs Cargo.toml# Add all files in the src/ directory
atomic add src/
# Add directory contents recursively
atomic add --recursive src/# Add every untracked file in the repository
atomic add --all# Add a file that matches an ignore pattern
atomic add --force .env.production# See what would be added without making changes
atomic add --dry-run .atomic remove- Remove files from trackingatomic move- Move or rename tracked filesatomic record- Record changesatomic diff- Show changes to tracked filesatomic status- Show the status of the working copy