Skip to main content

Usage

vibe checkout <branch> [options]

Description

Switch to a different branch or create a new branch and switch to it. This command changes your working context to the specified branch.
vibe switch is available as an alias with the same functionality, using Git’s newer syntax.

Arguments

branch
string
required
Branch name to switch to or create.

Options

-b, --create
boolean
Create a new branch and switch to it.
--source
string
Source branch to create from (used with -b). Defaults to current branch.

Examples

Switch to an Existing Branch

vibe checkout develop
Output:
Switched to branch 'develop'
  at commit abc1234

Create and Switch to a New Branch

vibe checkout -b feature/user-auth
Output:
Switched to a new branch 'feature/user-auth'
  created from 'main'

Create Branch from Specific Source

vibe checkout -b hotfix/urgent --source production
Creates a new branch from production instead of the current branch.

The switch Alias

vibe switch works the same as vibe checkout, using Git’s newer command syntax:
# Switch to existing branch
vibe switch develop

# Create and switch (use -c instead of -b)
vibe switch -c feature/new-feature

# Create from specific source
vibe switch -c hotfix --source production

Behavior

When you checkout a branch:
  1. Your working context switches to that branch
  2. Future vibe push commands will push to that branch
  3. Future vibe pull commands will pull from that branch
  4. The branch indicator in vibe branch updates

Error Messages

Branch Not Found

Branch 'feature' not found
Use 'vibe checkout -b feature' to create it
Solution: Create the branch with -b flag or check the branch name.

Already on Branch

Already on 'main'
This is informational - you’re already on the requested branch.

Branch Already Exists (when creating)

A branch named 'feature' already exists
Use 'vibe checkout feature' to switch to it
Solution: Switch to the existing branch or choose a different name.

Workflow Examples

Feature Branch Workflow

# Start on main
vibe checkout main

# Create feature branch
vibe checkout -b feature/login

# Work on feature...
vibe add .
vibe commit -m "Add login form"
vibe push

# Switch back to main
vibe checkout main

# Merge feature
vibe merge feature/login

Hotfix Workflow

# Create hotfix from production
vibe checkout -b hotfix/security --source production

# Fix the issue
vibe add .
vibe commit -m "Fix security vulnerability"
vibe push

# Merge to production and main
vibe checkout production
vibe merge hotfix/security

vibe checkout main
vibe merge hotfix/security