Repository navigation
[Bug]: Clean default-branch Push offers feature-branch checkout that fails with no changes to commit #18702
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web and apps/server
Steps to reproduce
- Open a project on its default branch,
main, with anoriginremote and at least one local commit to push. Leave the working tree clean. This can happen when an agent has already committed its changes, or after new-project publication failed after creating the remote. - Click the primary Push action.
- In the default-branch confirmation, select Check out feature branch & continue.
- The action fails before pushing:
Cannot create a feature branch because there are no changes to commit.
Expected behavior
The confirmation should offer an action the backend can complete. If automatic feature-branch creation needs uncommitted changes, that option should be disabled or omitted with a clear explanation for a clean working tree. Continuing a push on the current branch should remain available.
Actual behavior
The confirmation offers feature-branch checkout even when there is nothing to commit, then reports a Git manager error. This is confusing when the project already contains the commits the user is trying to publish.
The source for the installed release explains the path:
GitActionsControl.logic.ts:304returns a button labeled Push with actioncommit_pushfor a clean default branch with local commits to push. The corresponding upstream-present path does the same.GitActionsControl.tsx:2143disables Check out feature branch & continue only according to branch-change permissions, without checking for working-tree changes.GitActionsControl.tsx:1433submits that action withfeatureBranch: true.GitManager.ts:2819requires a commit/branch suggestion from working-tree changes and returns the observed error when there are none.
The confirmation needs to account for the backend's feature-branch preconditions before offering this action.
Impact
Minor bug or occasional failure. An offered action fails deterministically for already-committed changes, making first-time publishing harder to understand.
Version or commit
0.0.46-nightly.20261011.2994, release commit d07a07f33c0a1b317dea6234636976231c3688b5.
Environment
Ubuntu 26.04.1 LTS, x86_64; Git 2.53.0; headless t3 serve; default branch main; clean working tree with two commits and no upstream at the time of failure.
Logs or stack traces
Server trace entry from 2026-10-12 at 16:00:42 UTC:
GitManagerError: Git manager failed in runFeatureBranchStep: Cannot create a feature branch because there are no changes to commit.
at runFeatureBranchStep
at runStackedAction.runAction
at ws.rpc.git.runStackedAction
The affected project was clean and contained an initial commit plus an application commit. The reported error and path are confirmed in its server trace and the installed release's source. I did not repeat the UI interaction during investigation; the collaborative preview could not launch because of this host's browser sandbox configuration.
Workaround
Push the existing commits on the current branch without requesting automatic feature-branch creation. On this machine, git push --set-upstream origin main succeeded after separately correcting the remote's SSH/HTTPS mismatch. Local HEAD and remote main matched afterward.
Activity
juliusmarminge commentedon Oct 12, 2026
Note
Grok responding on behalf of Julius.
Confirmed on main, and it's a real bug. On a clean default branch with local commits, Push maps to
commit_push. The default-branch confirmation disables Check out feature branch & continue only throughcanChangeThreadBranch(GitActionsControl.tsx), and it never checks for working-tree changes. ThenGitManager.runFeatureBranchStepneeds a branch suggestion built from uncommitted changes, so it always throwsCannot create a feature branch because there are no changes to commit.The dialog is offering an action that can't succeed.Workaround: pick the continue-on-current-branch option, or create the branch yourself (
git switch -c my-branch) and then push.A fix should either disable or hide the feature-branch option when the tree is clean, or let the server create the branch from
HEADwhen there's nothing to commit.Related, not duplicates: #13831 / #16907 (the confirmation copy changes while the dialog closes).
evidence for pingdotgg#18702: before-dialog
evidence for pingdotgg#18702: before-toast
evidence for pingdotgg#18702: after-dialog
evidence for pingdotgg#18702: after-dirty-control