Skip to content

Add hotkeys to the worktree-conflict menu shown when deleting a branch#5631

Open
MitchellCash wants to merge 1 commit into
jesseduffield:masterfrom
MitchellCash:worktree-hotkeys
Open

Add hotkeys to the worktree-conflict menu shown when deleting a branch#5631
MitchellCash wants to merge 1 commit into
jesseduffield:masterfrom
MitchellCash:worktree-hotkeys

Conversation

@MitchellCash
Copy link
Copy Markdown

@MitchellCash MitchellCash commented May 24, 2026

PR Description

The menu that appears when deleting a branch that's checked out in another worktree had no keybindings, forcing users to navigate with arrow keys. Add 's', 'd', and 'r' for switch / detach / remove.

image

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@stefanhaller
Copy link
Copy Markdown
Collaborator

Looks like an easy change, but I'm undecided; the standard keybinding for deleting things in lazygit is d, so I feel that's what we should assign to "remove". Also, the "remove" item is probably going to change in the future to delete both the worktree and the branch, and we might reword this and the other items to make this clearer.

Holding off merging this for now for these reasons.

@MitchellCash
Copy link
Copy Markdown
Author

That makes sense. Funnily, the reason I was messing around these parts was because I had the same thought to "delete both the worktree and the branch", as the UX for that flow wasn't great, especially as I have been using worktrees more and more.

Short of having that change code complete, I figured a hotkey for removal of the worktree would get me by 😄 Happy to wait, especially if the "delete both the worktree and the branch" is coming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants