vers commit
Save the current state of a VM as a commit.Synopsis
Description
Thecommit command creates a snapshot of a VM’s current state by saving it as a commit. This preserves the exact state of the VM at a specific point in time. You can commit either your current HEAD VM or specify a particular VM by ID or alias.
Basic Usage
Commit Current HEAD VM
Commit Specific VM
What Happens During Commit
- VM Identification: Resolves the target VM (provided or HEAD)
- State Capture: Creates a snapshot of the VM’s current state
- Commit Creation: Saves the commit via the API with a 60-second timeout
Examples
Development Workflow
Release Process
Multiple Environment Commits
Commit Output
When you commit, you’ll see detailed information:- Commit ID: Unique identifier for this commit
Using HEAD VM
When no VM is specified, the command uses your current HEAD:Error Scenarios
VM Not Found
vers status.
No HEAD Set
vers checkout <vm-id> to set a HEAD, or specify a VM explicitly.
Timeout
Tips
- Commit before making risky changes to preserve known-good states
- Use descriptive VM aliases to identify important snapshots later
- You can restore from a commit using
vers run-commit
See Also
- vers checkout - Switch between VMs to commit different ones
- vers status - See available VMs and current HEAD
- vers branch - Create new VMs from committed states
- vers run-commit - Start environment from a commit