Repository navigation
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | 02ca58d | Nov 23 2026, 02:45 PM |
tnkuehne
added a commit
that referenced
this pull request
Nov 23, 2026
## Why `widefleet init` did not create a Git repository. A plain `git init` afterwards names the first branch `master` unless `init.defaultBranch` is configured (Git 2.53 still does). `widefleet deploy` saves the main app's source from the local branch `main`, so it then asks for confirmation in a terminal and fails without one, for example in CI or an agent shell: ``` You are on local branch master. This deploy updates branch main in Widefleet Git and publishes the code as the main app. Switch to main, or pass --allow-branch-mismatch to confirm this deployment ``` There is no `main` to switch to in that repository, so the hint does not help either. ## What changes - **`init`** (`crates/platform-cli/src/installation.rs`) runs `git init --initial-branch=main` in the new project, without a commit. A later `git init` only reinitializes it and keeps `main`. - A project inside an existing Git work tree, such as a monorepo, uses that repository, as deploy already does. No nested repository is created. - Without Git, `init` still creates the project, and deploy initializes the repository as before. - **Deploy branch error** (`crates/platform-cli/src/source.rs`): when the checkout has no local branch `main`, the error suggests `git branch -m main` instead of switching branches. ## Tests - New unit test: `init` starts a repository on `main`, and does not nest one inside an existing repository. - `cli.test.ts`: the branch mismatch test checks the rename hint. - `cargo clippy -p platform-cli --all-targets -D warnings`, `cargo test -p platform-cli` (63 passed) and `RUN_CLI_TESTS=1 vitest run apps/control-plane/tests/cli.test.ts` (61 passed). - Ran the built CLI from an assembled installation: `init my-app` prints `Initialized a Git repository on branch main`, a following `git init` keeps `main`, and `init` inside an existing repository creates no `.git`. Documentation: #337 (draft until a CLI release includes this change). <!-- greptile_comment --> <!-- greptile_summary --> <h2><a href="https://app.greptile.com/api/retrigger?id=116576946&sig=f62e811b66de83154f44bb78adc0ed16f4b4f7838876f3737e2d775085ac22c2"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><a href="https://app.greptile.com/-/switch-tenant?tenant=mendra&next=%2Fwidefleet%2Fwidefleet%2Fpull%2F336&utm_source=greptile_review&utm_medium=github&utm_campaign=view_in_greptile"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img alt="View in Greptile" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2" align="right"></picture></a>Confidence Score: 5/5</h2> <!-- greptile-impact-verdict --> The PR appears safe to merge. <details open><summary><h3>Summary</h3></summary> New projects start on Git branch `main` without an initial commit. - New projects start on the Git `main` branch. - Deploy explains how to rename a branch when local `main` is missing. No actionable issues were found. </details> <!-- greptile_confidence_score:5 --> <sub>Reviews (1) · Last reviewed commit: ["Start new projects on a Git main branch"](7c3bf2f) · [Reviewed by Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub> <!-- /greptile_comment -->
tnkuehne
force-pushed
the
cli-init-git-main-docs
branch
from
November 23, 2026 14:43
7766e2c to
02ca58d
Compare
widefleet init starts new projects on branch main. The source code guide shows how to rename a master branch before deploying the main app.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation for #336.
What changes
apps/docs/docs/reference/cli.mdx):initcreates a Git repository on branchmain. Inside an existing repository the project uses that one, and without Git the first deploy that saves source creates it.apps/docs/docs/guides/source-code.md): if a repository has no localmain, for example aftergit initnamed the first branchmaster, rename it withgit branch -m main.Blocked by
Checks
oxfmt --checkon both files andblume validate(no broken links).