class Git::Commands::Branch::Move

Implements the ‘git branch –move` command for renaming branches

This command moves/renames a branch, together with its config and reflog. If the old branch name is omitted, renames the current branch.

@example Rename the current branch

move = Git::Commands::Branch::Move.new(execution_context)
move.call('new-branch-name')

@example Rename a specific branch

move = Git::Commands::Branch::Move.new(execution_context)
move.call('old-branch-name', 'new-branch-name')

@example Force rename (overwrite existing branch)

move = Git::Commands::Branch::Move.new(execution_context)
move.call('old-branch', 'existing-branch', force: true)

@note ‘arguments` block audited against git-scm.com/docs/git-branch/2.53.0

@see Git::Commands::Branch

@see git-scm.com/docs/git-branch git-branch

@api private