Skip to main content

vers checkout

Switch your HEAD pointer to a different VM in your environment.

Synopsis

Description

The checkout command changes your current HEAD pointer to point to a different VM. HEAD determines which VM you’ll interact with when using commands like vers connect, vers execute, or other VM-specific operations.

Basic Usage

Show Current HEAD

Displays information about the VM your HEAD currently points to:
If your VM has an alias, it will show the alias instead:

Switch to VM by ID

Switches your HEAD to point to the specified VM ID.

Switch to VM by Alias

Switches your HEAD to point to the VM with the specified alias.

What Happens When You Checkout

  1. Verification: The command verifies the target VM exists and is accessible
  2. HEAD Update: Updates your local HEAD pointer to the target VM
  3. Confirmation: Shows the switch was successful with VM state information
Example output:

Examples

Basic VM Switching

Using Aliases

Development Workflow

Error Scenarios

VM Not Found

Solution: Check available VMs with vers status, or verify the VM ID/alias is correct.

No HEAD Set

Solution: Switch to a VM first, or run vers status to see available VMs.

Network/API Issues

Solution: Check your network connection and try again. The command has a 10-second timeout for VM verification.

Understanding HEAD

HEAD is a pointer that tracks which VM you’re currently “on”. When you run VM-specific commands, they operate on whatever VM HEAD points to:
  • vers connect - Connects to HEAD VM
  • vers execute - Runs commands on HEAD VM
  • vers branch - Creates new VM from HEAD VM (if no VM specified)
Think of HEAD as your “current working VM” - similar to how git has a current working branch.

Tips

  • Always run vers checkout to see your current VM before running other commands
  • Use meaningful aliases for your VMs to make switching easier
  • VM aliases are more memorable than VM IDs (e.g., production-app vs vm-a1b2c3d4)
  • If you’re unsure what VMs are available, use vers status

Common Patterns

Switch context by alias

Move HEAD back to the parent after a branch

Combine with status for orientation

See Also