Skip to content

[Bug]: Work locally in worktree github integration causes accidental push to main #2712

@sameerr03

Description

@sameerr03

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Create a worktree externally via git
  2. Open branch in t3code by selecting work locally and the branch name of the branch in the worktree
  3. Make changes via agent
  4. Press the commit, push and create pr button

t3 code will push the local changes to main (or the local checkout in project root) rather than to the upstream branch of the worktree branch. Pr creation fails since t3code tries to create a pr from main -> main

Expected behavior

Push made to the upstream of the worktree branch and pr created from worktree branch to main

Actual behavior

pushed straight to main and pr creation failed

Impact

Major degradation or frequent failure

Version or commit

main @ 0.0.24

Environment

macOS

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

use terminal git instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions