Skip to content

parsec start --branch — attach to existing branch without creating new one #46

@erishforG

Description

@erishforG

Description

Allow parsec start to attach to an existing branch instead of always creating a new one from the base branch.

Problem

Currently, parsec start always creates a new branch from main/master (or --base). When a developer has already been working on feature/CL-2208 outside of parsec, they can't bring it under parsec management without parsec adopt, which requires the branch to already exist as a worktree.

The gap: if you want to continue working on an existing remote branch inside a new parsec-managed worktree, there's no clean path.

Proposed Solution

# Create a parsec worktree using an existing branch
parsec start CL-2208 --branch feature/CL-2208

# If branch exists on remote but not locally, fetch and track it
parsec start CL-2208 --branch origin/feature/CL-2208

Behavior

  • --branch <name> tells parsec to use this existing branch instead of creating {prefix}/{ticket}
  • If the branch exists locally, create a worktree pointing to it
  • If the branch exists only on remote, fetch and create a local tracking branch
  • If the branch doesn't exist anywhere, error out (use regular parsec start for new branches)
  • The workspace is fully managed by parsec after this (ship, sync, status, etc.)

Difference from parsec adopt

  • adopt imports the current directory's branch into parsec
  • --branch creates a new worktree from a specified existing branch

Use Cases

  1. Taking over a colleague's branch for review/continuation
  2. Resuming work on a branch that was started before using parsec
  3. Working on a branch that was created by CI or another tool
  4. Feature branches that span multiple tickets

Priority

Medium — frequent pain point when mixing parsec with regular git workflow

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