class Git::Commands::Worktree::Move
Moves a linked worktree to a new filesystem location
@example Move a worktree to a new path
Git::Commands::Worktree::Move.new(execution_context).call('/tmp/old', '/tmp/new')
@example Force-move a locked worktree
Git::Commands::Worktree::Move.new(execution_context).call('/tmp/feat', '/tmp/feat2', force: 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
Public Instance Methods
Source
# File lib/git/commands/worktree/move.rb, line 62 def call(...) = super # rubocop:disable Lint/UselessMethodDefinition end
@overload call(worktree, new_path, **options)
Move a linked worktree to a new filesystem location @param worktree [String] path or unique suffix identifying the worktree to move @param new_path [String] destination path for the worktree @param options [Hash] command options @option options [Boolean, Integer, nil] :force (nil) allow moving a locked worktree Pass `true` or `1` to emit `--force` once. Pass `2` to emit `--force --force`, which also handles locked or missing destinations. Alias: :f @return [Git::CommandLine::Result] the result of calling `git worktree move`
@raise [ArgumentError] if unsupported options are provided
@raise [Git::FailedError] if git exits with a non-zero exit status
@api public
Calls superclass method
Git::Commands::Base::call