This repo has multiple remotes with different purposes:
origin → https://github.com/sst/opencode.git (PUBLIC - upstream)
fork → [email protected]:stevenvo/opencode.git (PUBLIC - your fork)
geocomply → [email protected]:GeoComply/opencode.git (PRIVATE - GeoComply fork)
haoxiangliew → https://github.com/haoxiangliew/opencode.git (PUBLIC - reference)
GeoComply Private Branches:
geocomply/main- Stable/production branch (for npm package builds)geocomply/dev- Active development branch (your daily work)
Public Upstream Mirror:
upstream-dev- Local mirror oforigin/dev(sst/opencode public repo)- Pull latest public changes here, then sync to private branches
Personal Branches:
steven/*- Your experimental/personal work branches
To geocomply remote (GeoComply private repo):
- ✅
geocomply-devbranch (main private development branch) - ✅
feature/*branches (new features) - ✅
fix/*branches (bug fixes) - ✅
chore/*branches (maintenance) - ✅
docs/*branches (documentation) - ✅
steven/*branches (personal work)
Cannot push to:
- ❌
origin(sst/opencode) - public upstream - ❌
fork(stevenvo/opencode) - your public fork - ❌
haoxiangliew- reference remote - ❌
dev,main,masterbranches to any remote
For features/fixes that stay private:
# Work on dev branch
git checkout dev
# ... make changes ...
git add .
git commit -m "feat: add private feature"
git push geocomply devPull latest from public repo and merge into private:
# Update upstream mirror
git checkout upstream-dev
git pull origin dev
# Merge into private main
git checkout main # or create branch from main
git merge upstream-dev
# Resolve conflicts if any
# Push to private repo
git push geocomply mainFor organized private development:
# Create feature branch from dev
git checkout dev
git checkout -b feature/my-feature
# ... make changes ...
git add .
git commit -m "feat: implement my feature"
git push geocomply feature/my-feature
# Create PR on GitHub: feature/my-feature → geocomply/dev
# After merge, delete branchFor features that should go to public sst/opencode:
# Start from latest public upstream
git checkout upstream-dev
git pull origin dev
git checkout -b feature/public-contribution
# ... make changes ...
git add .
git commit -m "feat: public feature"
# Push to your PUBLIC fork (NOT directly)
git push fork feature/public-contribution
# Create PR on GitHub: stevenvo/opencode:feature/public-contribution → sst/opencode:devFor features that need to be in both repos:
# 1. Develop on private first
git checkout dev
git checkout -b feature/shared-feature
# ... make changes ...
git commit -m "feat: shared feature"
git push geocomply feature/shared-feature
# 2. Create PR to geocomply/dev, merge it
# 3. Cherry-pick or rebase for public contribution
git checkout upstream-dev
git pull origin dev
git checkout -b feature/shared-feature-public
git cherry-pick <commit-hash> # or rebase onto upstream-dev
# 4. Push to your fork for public PR
git push fork feature/shared-feature-public
# 5. Create PR: stevenvo/opencode:feature/shared-feature-public → sst/opencode:dev| Pattern | Purpose | Example |
|---|---|---|
geocomply-dev |
Main private development | geocomply-dev |
feature/* |
New features | feature/1m-context |
fix/* |
Bug fixes | fix/session-crash |
chore/* |
Maintenance | chore/update-deps |
docs/* |
Documentation | docs/update-readme |
steven/* |
Personal branches | steven/experiment |
# From geocomply-dev branch
cd packages/opencode
npm version patch # or minor/major
npm publishSee packages/opencode/PUBLISHING.md for details.
Located at .husky/pre-push, this hook:
- Blocks direct pushes to public repos (origin, fork)
- Allows only approved branches to geocomply remote
- Warns on non-standard branch names
- Provides helpful guidance when blocked
To bypass the hook (NOT recommended):
git push --no-verify geocomply geocomply-dev# Check current remote setup
git remote -v
# Check current branch
git branch --show-current
# See which remote a branch tracks
git branch -vv
# Safe push to private repo
git push geocomply geocomply-dev
# BLOCKED - will fail
git push origin dev
git push fork main- "I want to work on a private feature" → Use
geocomply-devorfeature/*branch - "I want to contribute upstream" → Use
feature/*branch, push tofork, create PR toorigin - "I need both private and public" → Develop on
geocomply-dev, cherry-pick to public branch - "Push was blocked, why?" → Check the error message, it tells you what to do
Golden Rule:
geocomplyremote = private development (always allowed)origin/forkremotes = public contributions (only via PRs, never direct push)