worktree-new

worktree-new

Create a new worktree for a branch.

Usage

bearing worktree new <repo> <branch> [flags]

Arguments

ArgumentDescription
repoName of the repository (base folder name)
branchBranch name to create/checkout

Options

OptionDescription
--based-on <branch>Branch to base the new branch on (default: main)
--purpose "<text>"Description of what this worktree is for

Examples

# Basic usage
bearing worktree new myapp feature-auth

# With metadata
bearing worktree new myapp feature-auth \
  --based-on develop \
  --purpose "Add user authentication flow"

What It Does

  1. Creates a new git worktree at {repo}-{branch}
  2. Checks out (or creates) the specified branch
  3. Records the worktree in local.jsonl
  4. Records the branch in workflow.jsonl

Notes