feat: support local git repositories without a remote#896
Merged
Conversation
Accept git repos that have no remote (local-only), including worktree
workspaces. Branches, diffs, commits, and worktrees all work; the default
branch comes from local HEAD.
- Unify remote handling: add `git_ops::remote_name()` as the single source
of truth and remove all `unwrap_or("origin")` debt; restore is now
best-effort on the remote (and works without one).
- Repo creation no longer rejects no-remote git repos; forge_provider stays
None when there's no remote.
- Worktree creation forks from a local branch when there's no remote.
- Gate push / pull / fetch / PR / Connect UI for local-only repos; repo
settings becomes three-state (normal / no-remote / non-git) with a
local-branch picker and a "Local-only repository" notice.
…it-worktree-research-plan
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📄 Knowledge review✏️ Suggested updates2 page suggestions need review.
📝 01 - Repository@@ -15,10 +15,11 @@
| Mode | What you get |
|------|-------------|
-| **Local only** | File browsing, workspace creation, agent sessions, local commits. |
+| **Non-git folder** | File browsing only. No git history, branches, or commits. |
+| **Local git repository (no remote)** | Git operations (branches, diffs, worktrees, commits) available. Push/pull/PR features hidden. |
| **GitHub-connected** | Everything above, plus remote branch tracking, account identity, and pull request workflows. |
-A local repository is sufficient for isolated agent work and review. Connect GitHub when you need remote collaboration, branch protection context, or PR-based shipping.
+A local git repository is sufficient for isolated agent work and review. Connect GitHub when you need remote collaboration, branch protection context, or PR-based shipping.
## Adding a repository
📝 03 - Add a Repository@@ -9,6 +9,8 @@
3. Confirm the detected default branch (e.g., `main` or `master`).
The repository appears in your sidebar immediately. Helmor reads the Git history, branches, and file tree from disk.
+
+> **Note:** Git repositories without a remote are fully supported. Basic Git operations — branches, diffs, worktrees, and commits — all work locally. Push, pull, and pull request features are only available when a remote is configured.
## Add a GitHub repository
@@ -23,7 +25,7 @@
- **Workspaces** — isolated copies branched from your default or target branch.
- **File browsing** — view, search, and navigate the project tree.
- **Diffs** — compare agent changes against the base branch.
-- **Git operations** — commit, push, and prepare PRs from inside the app.
+- **Git operations** — commit locally, create branches, and manage worktrees; push and PRs require a configured remote.
Helmor does not replace Git. It wraps Git with an agent-friendly workflow layer.
@@ -31,6 +33,6 @@
- Add repositories you are comfortable reviewing through Helmor.
- Use one workspace per task — avoid long-lived "catch-all" workspaces with unrelated changes.
-- For team projects, connect GitHub so workspaces can target the correct remote branch and shipping path.
+- Connect GitHub for team projects to enable push, pull, and pull request workflows targeting the correct remote branch.
**Next:** [Create a Workspace](https://app.dosu.dev/9207e853-a462-496b-ac67-bc8e8fde3782/documents/d9f9b034-8c2d-4974-b0b8-af9b3e56e377) to start your first task. |
A git repo with no remote was still showing remote-only UI that makes no
sense without a remote:
- The inspector "Actions → Git" section dropped the push-status row
("Branch fully pushed" / "Branch not published"); only uncommitted and
sync (shown as "unavailable") remain.
- The workspace header no longer renders the `→ target branch` picker or
the stacked-PR chip — it shows just the current branch name.
- Inspector "uncommitted changes" action commits locally only when the repo has no remote. It was hardcoded to commit-and-push, so the dispatched prompt told the agent to `git push -u origin HEAD` — which always failed on a remoteless repo (and the header commit button is hidden there, so this was the only commit entry). The prompt now skips push and the row reads "Commit" instead of "Commit and push" when there's no remote. - Changes-section `hasRemote` now keys off the remote name (the repo.remote SSOT) instead of remoteUrl, matching header/panel/settings. - Reword the default-branch resolution error: an empty `git init` repo resolves to its unborn branch and is accepted, so the old "empty repository" wording was misleading.
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.
closes #873
closes #290
closes #841
Summary
Adds first-class support for local git repositories that have no remote. Previously Helmor rejected any git repo without a remote (“Local-only repositories are not supported”). Now such repos work as full git workspaces — in both Local and Worktree modes — with the remote-only features (push, pull, fetch, pull requests, forge connect) cleanly hidden.
What changed
Backend
HEAD(falling back to the first local branch for a detached/unborn HEAD);remote/remote_url/forge_providerstayNone.git_ops::remote_name()is now the source of truth for “has a remote”, replacing ~19 scatteredunwrap_or("origin")sites that faked anorigin. Restore is best-effort on the remote (and works without one).Frontend
Tests
cargo clippy -D warningsand the fullcargo testsuite pass.A
minorchangeset and an in-app announcement are included.