Skip to content

Add keybind for renaming/moving worktrees #5946

Description

@fregys

Is your feature request related to a problem? Please describe.

The worktrees panel supports creating, switching, and removing worktrees, but there's no current implementation to move/rename one. I always had to drop to the shell to rename my worktree using git worktree move. After a short time I created a customCommand for it.

Describe the solution you'd like

A keybinding in the worktrees panel (e.g. r, mirroring branch rename R) that prompts for a new path, pre-filled with the current one, and runs git worktree move (or other command if there is a better one for this job).

Describe alternatives you've considered

I am currently using custom command scoped to the worktrees context:

customCommands:

  • key: "r"
    description: "Move/rename worktree"
    context: "worktrees"
    prompts:
    • type: "input"
      key: "Path"
      title: "New worktree path:"
      initialValue: "{{ .SelectedWorktree.Path }}"
      command: "git worktree move {{ .SelectedWorktree.Path | quote }} {{ .Form.Path | quote }}"

but it feels like it belongs built-in alongside create/remove.

Additional context


Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions