atomic apply
Apply a change to a stack.
Synopsis​
atomic apply [OPTIONS] <CHANGE>
Description​
The apply command applies a change file to a stack, incorporating the patches into the repository without requiring the working copy to be the source. This is useful for:
- Applying changes from other repositories
- Integrating patches received via email or file transfer
- Cherry-picking specific changes
- Applying changes to different stacks
When you apply a change, Atomic:
- Reads the change file from
.atomic/changes/ - Verifies the change's dependencies are satisfied
- Applies the patch operations to the stack
- Updates the pristine database
- Optionally updates the working copy
Arguments​
<CHANGE>​
The hash of the change to apply. Can be:
- Full hash (53 characters)
- Abbreviated hash (minimum 2 characters)
- Path to a change file
# Full hash
atomic apply MNYNGT2VGEQZX4QA43FWBDVYQY7CGXN4J2CGE5FDFIHOWQFKFIJQC
# Abbreviated hash
atomic apply MNYNGT2V
# From file
atomic apply /path/to/change.change
Options​
--stack <STACK>​
Apply the change to a specific stack instead of the current stack.
atomic apply --stack feature-branch ABCD1234...
--repository <PATH>​
Specify the repository path.
atomic apply --repository /path/to/repo ABCD1234...
--deps-only​
Only apply the dependencies of the change, not the change itself.
atomic apply --deps-only ABCD1234...
Examples​
Basic Apply​
# Apply a change to current stack
atomic apply MNYNGT2VGEQZX4QA43FWBDVYQY7CGXN4J2CGE5FDFIHOWQFKFIJQC
# Apply with abbreviated hash
atomic apply MNYNGT2V
Apply to Different Stack​
# Apply change to feature branch
atomic apply --stack feature ABCD1234...
Cherry-Picking​
# Apply specific change from another repository
cp ../other-repo/.atomic/changes/AB/CDEF...change .atomic/changes/AB/
atomic apply ABCDEF...
Notes​
- Dependencies: All dependencies must be satisfied before applying
- Conflicts: May produce conflicts if change doesn't apply cleanly
- Working Copy: Use
atomic resetafter apply to update working copy - Immutable: Applied changes are immutable and cryptographically verified
See Also​
atomic record- Record new changesatomic unrecord- Remove changesatomic pull- Pull and apply changes from remotesatomic change- Inspect change files
Related Concepts​
- Changes - Immutable semantic patches
- Dependencies - Change prerequisites
- Stacks - Independent lines of development