Skip to content

Add config option to disable confirmation when switching to a worktree branch #4938

@opus131

Description

@opus131

I’m frequently switching between worktree branches, which always brings up this dialog:

+-----------------------------------------------+
| This branch is checked out by worktree `foo`. | 
| Do you want to switch to that worktree?       |
+-----------------------------------------------+

It would be great to have a configuration option to disable this confirmation, similar to options like confirmOnQuit, e.g.

# If false, Lazygit won't show a confirmation dialog before switching to a worktree branch
confirmOnSwitchToWorktreeBranch: true

This would make branch switching in multi-worktree setups much smoother and the default value of true makes it a conscious opt-in.

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