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 name to switch to or create.
Options
Create a new branch and switch to it.
Source branch to create from (used with -b). Defaults to current branch.
Examples
Switch to an Existing Branch
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:
- Your working context switches to that branch
- Future
vibe push commands will push to that branch
- Future
vibe pull commands will pull from that branch
- 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
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