Skip to content

[Bug]: The Git action treats the default branch as a feature branch when the only remote is not named origin #35064

Closed

Description

@only21mil

Before submitting

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

Area

apps/server

Steps to reproduce

  1. Make a repository on trunk whose only remote is named github, push trunk with an upstream, and set the remote's default branch:
    git init --bare -b trunk /path/to/sample-service-remote.git
    git init -b trunk sample-service && cd sample-service
    echo "# Sample service" > README.md && git add README.md && git commit -m "Initial commit"
    git remote add github /path/to/sample-service-remote.git
    git push -u github trunk
    git remote set-head github trunk
    echo "A local edit." >> README.md
  2. Add the folder as a project in T3 Code and open a new thread in it.
  3. Look at the Git action in the thread details panel, then click it.

Expected behavior

T3 Code knows trunk is the default branch, as it does when the same remote is named origin: the button reads "Commit & push" and clicking it asks "Commit & push to default ref?" before committing.

Actual behavior

The button reads "Commit, push & PR" on trunk. Clicking it shows no prompt and fails with "Action failed: Git manager failed in runStackedAction: trunk is the base branch. Check out a feature branch to create a change request." Nothing is committed. A repository set up the same way with the remote named origin shows "Commit & push" and the default-branch prompt.

Impact

Minor bug or occasional failure

Version or commit

main, commit b68aedf

Environment

Linux, web client in Chromium, dev server from source with a fresh home, Node 26.12.1, git 2.53.

Logs or stack traces

Action failed
Git manager failed in runStackedAction: trunk is the base branch. Check out a feature branch to create a change request.

Screenshots, recordings, or supporting files

main b68aedf: on trunk with the only remote named github, the Git action reads "Commit, push & PR"
main b68aedf: on trunk with the only remote named github, the Git action reads "Commit, push & PR"

Workaround

Name the remote origin.

A fix is in #28815.

Activity

  1. juliusmarminge commented on Nov 12, 2026

    @juliusmarminge
    Member

    Fixed by #28815, now on main: With github as the only remote and github/HEAD pointing to trunk, opening a thread on trunk now offers “Commit & push” and asks for default-branch confirmation instead of offering “Commit, push & PR” and failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions