Skip to main content

Usage

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

Output:

Create and Switch to a New Branch

Output:

Create Branch from Specific Source

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:

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

Solution: Create the branch with -b flag or check the branch name.

Already on Branch

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

Branch Already Exists (when creating)

Solution: Switch to the existing branch or choose a different name.

Workflow Examples

Feature Branch Workflow

Hotfix Workflow