Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: filter phantom "origin" branch from remote branches list

Adam Eivy913aace4f4bf
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 76abfe84f2..0e4f52ebd8 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -7,5 +7,6 @@
## Fixed
- setup-data script now copies missing files (not just directories) from data.sample to data, fixing broken updates where new config files like stage-config.json were never propagated to existing installs
+- Git remote branches list no longer shows phantom "origin" branch from bare symbolic refs
## Removed
diff --git a/server/services/git.js b/server/services/git.js
index ae68d19e34..c3604d2b7d 100644
--- a/server/services/git.js
+++ b/server/services/git.js
@@ -621,8 +621,8 @@ export async function getRemoteBranches(dir) {
const [fullRef, date, author] = line.split('|');
// Strip "origin/" prefix
const name = fullRef.replace(/^origin\//, '');
- // Skip HEAD pointer
- if (name === 'HEAD' || fullRef.includes('HEAD')) return null;
+ // Skip HEAD pointer and refs without a branch name (bare remote name)
+ if (name === 'HEAD' || fullRef.includes('HEAD') || !fullRef.includes('/')) return null;
return {
name,
fullRef,