Skip to content

daft start

Create a new branch and worktree

Usage

daft start [OPTIONS] <BRANCH_NAME> [BASE_BRANCH_NAME]

This is equivalent to git worktree-checkout -b. All options and arguments are the same as git worktree-checkout with -b implied.

Description

Creates a new branch and a corresponding worktree in a single operation. The new branch is based on the current branch, or on <BASE_BRANCH_NAME> if specified.

By default, daft does not push the new branch to the remote. To enable pushing and upstream tracking, set daft.checkout.push true or use daft config remote-sync --on. You can also pass --local to skip remote operations for a single invocation regardless of config.

Arguments

ArgumentDescriptionRequired
<BRANCH_NAME>Name of the new branch to createYes
<BASE_BRANCH_NAME>Branch to use as the base; defaults to the current branchNo

Options

OptionDescriptionDefault
--localSkip all remote operations (no fetch, no push) for this invocation
-c, --carryApply uncommitted changes from the current worktree to the new one
--no-carryDo not carry uncommitted changes
-x, --exec <EXEC>Run a command in the worktree after setup completes (repeatable)
--no-cdDo not change directory to the new worktree
-v, --verboseShow detailed progress
-q, --quietSuppress non-error output

Global Options

OptionDescription
-h, --helpPrint help information
-V, --versionPrint version information

See Also

Released under MIT or Apache-2.0.