vers branch
Create a new VM from an existing VM, inheriting its complete state.Synopsis
Description
Thebranch command creates a new VM that inherits the complete state from an existing VM. This allows you to continue from exactly where the parent VM left off, but in a separate environment where you can make different changes.
The new VM gets an exact copy of the parent’s filesystem and memory state.
Basic Usage
Create VM from Current HEAD
Create VM from Specific VM
Create VM with Custom Alias
Options
--alias, -n
Assign a custom alias to the new VM:
--checkout, -c
Automatically switch your HEAD to the new VM after creation:
What Happens When You Branch
- State Inheritance: The new VM gets an exact copy of the parent’s filesystem and memory
- VM Creation: A new VM is created via the API with a unique VM ID
- Optional Aliasing: If
--aliasis provided, the VM gets a friendly name - Optional Checkout: If
--checkoutis used, your HEAD pointer switches to the new VM
Examples
Basic VM Creation
Creating and Switching
Creating from Specific VM
Understanding Branch Output
When you create a VM, you’ll see output like:- Which VM was used as the source
- The new VM’s ID and alias (if provided)
- The current state of the new VM
- Instructions for switching to the new VM
Common Workflows
Experimentation
Parallel Development
Tips
- If you don’t specify
--alias, the new VM will only be accessible by its VM ID - Aliases make it easier to remember and switch between VMs
- Use
--checkoutwhen you want to immediately start working on the new VM - The parent VM remains unchanged and accessible
See Also
- vers checkout - Switch between VMs
- vers status - See your current HEAD and available VMs
- vers tree - Visualize your VM hierarchy