Skip to content

feat: add mv/rename command for worktree renaming #93

@kawarimidoll

Description

@kawarimidoll

Problem

When a worktree's branch name no longer reflects its purpose (e.g., feature-wip should become feature-auth), users must manually:

  1. Rename the branch with git branch -m
  2. Move the worktree directory with git worktree move
  3. Ensure both operations succeed or manually rollback

Proposed Solution

Add a git gtr mv (or git gtr rename) command that renames both the worktree directory and its associated branch in a single operation.

git gtr mv feature-wip feature-auth
git gtr mv old-name new-name --force  # for locked worktree

I'm happy to implement this if needed :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions