Skip to content

Config option for automatic wt remove --no-delete-branch #2587

Closed

Description

@jameslairdsmith

I was hoping to configure worktrunk so that it never deleted branches when calling wt remove. I see there is the --no-delete-branch command line flag, but as far as I can tell there is no way to use the config file to make it the default behavior. I would imagine it would look something like this:

[remove]
no-delete-branch = true

Activity

  1. worktrunk-bot commented on May 4, 2026

    @worktrunk-bot
    Collaborator

    Thanks for the suggestion. I searched the codebase and didn't find an existing implementation of a [remove] config section — the option is currently CLI-only at src/cli/mod.rs:407.

    The closest precedent is the existing [merge] section which mirrors wt merge flags as boolean defaults (squash, commit, rebase, remove, verify, ff). A [remove] section with delete-branch = false would fit the same pattern.

    I'll leave it for a maintainer to evaluate and prioritize.

  2. max-sixty commented on May 4, 2026

    @max-sixty
    Owner

    @worktrunk-bot we could add this

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

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