Skip to content

vibe scratch

The scratch command creates a Git Worktree with an auto-generated scratch/<timestamp> branch name. It is the same as vibe start but without the friction of choosing a name upfront — useful for “just trying something.”

Terminal window
vibe scratch [options]

vibe scratch accepts the same options as vibe start, except for --claude-code-worktree-hook.

OptionDescription
--reuseUse an existing branch (rarely meaningful)
--base <ref>Base branch/commit for the new branch
--trackSet upstream tracking when using --base
--no-hooksSkip pre-start and post-start hooks
--no-copySkip file and directory copying
-n, --dry-runPreview operations without executing
-V, --verboseShow detailed output
-q, --quietSuppress non-essential output
Terminal window
# Create a scratch worktree
vibe scratch
# Create from a specific base branch
vibe scratch --base develop
# Quick scratch without hooks
vibe scratch --no-hooks

Output:

$ vibe scratch
Created worktree: scratch/20260427-143052
Promote with: vibe rename <new-name>

The generated branch name is scratch/<YYYYMMDD-HHMMSS> in local time. The format is:

  • Sortable: newest worktrees rank highest in vibe list
  • Predictable: associates a worktree with the time you started it
  • Collision-free: if the same second is hit twice (rare in practice), -2, -3, … are appended

Once the name is generated, vibe scratch runs the exact same flow as vibe start:

  1. Pre-start hooks in origin repository
  2. Worktree creation
  3. File copying
  4. Post-start hooks in new worktree
  5. Directory change to the new worktree

After success, vibe prints a hint pointing at vibe rename so you can promote the scratch to a real name once your work crystallizes.

If the scratch produces something worth keeping, run vibe rename <name> from inside the worktree:

Terminal window
$ cd /path/to/scratch-20260427-143052
$ vibe rename my-feature
Renamed scratch/20260427-143052 -> my-feature

Use vibe clean to remove a scratch you no longer need. There is no special treatment for scratches — they behave like any other worktree.

  • start - Create a worktree with an explicit name
  • rename - Promote a scratch to a real name
  • clean - Remove a worktree when done