Skip to content

feat: add wt pr command to create PR from worktree branch #11

@notdp

Description

@notdp

Feature Request

Add a wt pr command that creates a pull request from the current worktree's branch to the main branch.

Proposed Usage

# From within a worktree
wt pr                    # Create PR to default base branch
wt pr --base develop     # Create PR to specific base branch
wt pr --draft            # Create as draft PR

Motivation

When working with worktrees, a common workflow is:

  1. wt add <name> - create worktree
  2. Make changes and commit
  3. Create PR (currently requires manual gh pr create or web UI)
  4. wt merge <name> / wt rm <name>

Adding wt pr would streamline step 3 and keep the workflow within wt.

Implementation Notes

  • Could wrap gh pr create if available
  • Auto-detect base branch from config or default branch
  • Support common PR options (title, body, draft, reviewers)

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