Skip to content

feat: support --from / --from-current on lwt add #1

Description

@linuz90

Problem

Currently lwt add always branches from the default branch (main/master). There's no way to create a worktree branching from a specific ref or the current branch.

Use case

Creating sub-feature branches off an in-progress feature branch — e.g. you're working on feat-api and want to spin off feat-api-retries from it, not from main.

Proposed behavior

# Branch from a specific ref (branch, tag, commit)
lwt add feat-api-retries --from feat-api

# Branch from whatever branch the current worktree is on
lwt add feat-api-retries --from-current

Both flags control the base ref passed to git worktree add -b <new> <path> <base>.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions