Skip to content

Feature request: pull default branch before workspace start #23

Description

@shaunpatel

Feature request: optional pull of default branch before workspace creation

Summary

Add an option to automatically pull the repository's default branch (e.g. main) before creating a workspace, so workspace branches are always based on an up-to-date default branch.

Problem

par workspace start currently creates workspace branches from whatever branch is checked out locally in each repo. If those branches are stale, the workspace starts from an outdated base. In multi-repo workflows, this requires manual steps (checkout & pull) for each repo before creating a workspace.

Proposed enhancement

Add a flag such as:

  • par workspace start ... --pull-default (pulls origin/HEAD / default branch)
  • par workspace start ... --base main --pull (or similar)

Behavior:

  1. Determine the default branch (via origin/HEAD or explicit --base).
  2. Checkout that branch in each repo.
  3. Run git pull --ff-only (or safe equivalent).
  4. Create workspace branches from that updated base.

Why this would help

  • Keeps bases consistent across repos
  • Removes manual prep and reduces subtle "why is my branch behind?" confusion
  • Aligns workspace UX with par start --base for single-repo sessions

Backward compatibility

This should be opt-in and preserve current behavior when the flag is not provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions