Skip to content

git worktree-carry

Transfer uncommitted changes to other worktrees

TIP

This command is also available as daft carry. See daft carry.

Description

Transfers uncommitted changes (staged, unstaged, and untracked files) from the current worktree to one or more target worktrees.

When a single target is specified without --copy, changes are moved: they are applied to the target worktree and removed from the source. When --copy is specified or multiple targets are given, changes are copied: they are applied to all targets while remaining in the source worktree.

Targets may be specified by worktree directory name or by branch name. If both a worktree and a branch have the same name, the worktree takes precedence.

After transferring changes, the working directory is changed to the last target worktree (or the only target, if just one was specified).

Usage

git worktree-carry [OPTIONS] <TARGETS>

Arguments

ArgumentDescriptionRequired
<TARGETS>Target worktree(s) by directory name or branch nameYes

Options

OptionDescriptionDefault
-c, --copyCopy changes instead of moving; changes remain in the source worktree
-v, --verboseBe verbose; show detailed progress

Global Options

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

See Also

Released under the MIT License.