Skip to main content

Usage

vibe branch [name] [options]

Description

Manage branches in your VibeHub project. List existing branches, create new ones, rename, or delete branches.

Arguments

name
string
Branch name to create. If omitted, lists all branches.

Options

-a, --all
boolean
List all branches (local + remote).
-v, --verbose
boolean
Show branches with last commit info.
-vv, --very-verbose
boolean
Show tracking info and last fetch time.
-d, --delete
string
Delete a branch (safe - checks if merged first).
-D, --force-delete
string
Force delete a branch without merge check.
-m, --move
string
Rename a branch. Usage: -m <old-name> <new-name>
--set-upstream-to
string
Set upstream tracking branch for the current branch.

Examples

List All Branches

vibe branch
Output:
* main (default)
  feature/user-auth
  develop
The * indicates the current branch.

List Branches with Details

vibe branch -v
Output:
* main (default) abc1234
  feature/user-auth def5678
  develop (no commits)

Create a New Branch

vibe branch feature/new-feature
Creates a new branch from the current branch.

Delete a Branch (Safe)

vibe branch -d feature/completed
This checks if the branch is fully merged before deleting.
Safe delete will fail if the branch has unmerged commits. Use -D to force delete.

Force Delete a Branch

vibe branch -D feature/abandoned
Deletes the branch regardless of merge status.

Rename a Branch

vibe branch -m old-name new-name

Set Upstream Tracking

vibe branch --set-upstream-to origin/main

Branch Indicators

IndicatorMeaning
*Current branch
(default)Default branch
[protected]Protected branch

Restrictions

You cannot delete:
  • The default branch
  • Protected branches
  • The currently checked out branch

Error Messages

Branch Already Exists

A branch named 'feature' already exists
Solution: Choose a different name or checkout the existing branch.

Cannot Delete Current Branch

Cannot delete branch 'main' checked out at current location
Solution: Switch to another branch first with vibe checkout.

Branch Not Fully Merged

Branch 'feature' is not fully merged
  3 commit(s) ahead of 'main'
Use -D to force delete
Solution: Either merge the branch first or use -D to force delete.