class Git::Commands::Worktree::Add

Creates a new linked worktree

@example Add a worktree at a path (auto-creates a branch)

Git::Commands::Worktree::Add.new(execution_context).call('/tmp/feature')

@example Add a worktree and check out an existing branch

Git::Commands::Worktree::Add.new(execution_context).call('/tmp/hotfix', 'main')

@example Add a worktree with a new branch

Git::Commands::Worktree::Add.new(execution_context).call('/tmp/feat', b: 'feature/new')

@example Add a detached-HEAD worktree locked at creation

Git::Commands::Worktree::Add.new(execution_context).call('/tmp/exp', detach: true, lock: true)

@note โ€˜arguments` block audited against

https://git-scm.com/docs/git-worktree/2.54.0

@see Git::Commands::Worktree Git::Commands::Worktree for the full sub-command list

@see git-scm.com/docs/git-worktree git-worktree documentation

@api private