Skip to content

Commit 73999ea

Browse files
committed
docs: clarify rebase/push defaults for opencode and opencode-cloud
1 parent dc554f6 commit 73999ea

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ The `scripts/set-all-versions.sh` script handles version updates automatically.
5757
## Git Workflow
5858

5959
- Always use rebase pulls (e.g., `git pull --rebase`).
60-
- When pushing, push to `main` (do not push to feature branches unless explicitly requested).
60+
- For pushes in the `packages/opencode/` submodule, default to the upstream `dev` flow unless explicitly requested otherwise:
61+
- Rebase pull from `dev` first (for example: `git pull --rebase origin dev`).
62+
- Then push to the effective `dev` branch/tip for that repository (for example: `git push origin HEAD:dev`).
63+
- For pushes in the `opencode-cloud` superproject, default to `main` unless explicitly requested otherwise:
64+
- Rebase pull from `main` first (for example: `git pull --rebase origin main`).
65+
- Then push to `main`.
6166

6267
## Working with Git Worktrees and Submodules
6368

CLAUDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ When updating versions or metadata, keep these files in sync:
5454

5555
The `scripts/set-all-versions.sh` script handles version updates automatically. For other metadata changes, update both files manually.
5656

57+
## Git Workflow
58+
59+
- Always use rebase pulls (e.g., `git pull --rebase`).
60+
- For pushes in the `packages/opencode/` submodule, default to the upstream `dev` flow unless explicitly requested otherwise:
61+
- Rebase pull from `dev` first (for example: `git pull --rebase origin dev`).
62+
- Then push to the effective `dev` branch/tip for that repository (for example: `git push origin HEAD:dev`).
63+
- For pushes in the `opencode-cloud` superproject, default to `main` unless explicitly requested otherwise:
64+
- Rebase pull from `main` first (for example: `git pull --rebase origin main`).
65+
- Then push to `main`.
66+
5767
## Working with Git Worktrees and Submodules
5868

5969
Git worktrees and submodules work together, but support is incomplete and requires care.

0 commit comments

Comments
 (0)