@@ -54,6 +54,7 @@ git merge upstream/main
5454### 4. Resolve Conflicts (If Any)
5555
5656If there are conflicts:
57+
5758``` bash
5859# Resolve conflicts in files
5960git status # See conflicted files
@@ -80,6 +81,7 @@ cd skycode-opencode
8081```
8182
8283** What it does:**
84+
8385- Checks for upstream remote (adds if missing)
8486- Fetches upstream changes
8587- Stashes local uncommitted changes (if any)
@@ -90,23 +92,27 @@ cd skycode-opencode
9092## Sync Strategy
9193
9294### Recommended Frequency
95+
9396- ** Monthly** : Regular syncs to get upstream bug fixes and features
9497- ** As Needed** : When upstream releases important features or fixes
9598
9699### Branch Strategy
100+
97101- ** dev** : SkyCode's development branch (sync with upstream/main)
98102- ** main** : Stable branch (sync before releases)
99- - ** feature/*** : Feature branches (sync before merging)
103+ - ** feature/\ *** : Feature branches (sync before merging)
100104
101105### What to Keep in Fork vs. Main Repo
102106
103107** In Fork (skycode-opencode):**
108+
104109- ✅ Version pinning/compatibility changes
105110- ✅ Major incompatible behavior changes (rare)
106111- ✅ OpenCode core modifications needed for SkyCode
107112- ✅ Build configuration for bundling
108113
109114** In Main Repo (skycode):**
115+
110116- ✅ ** All SkyCode plugins** (` packages/opencode-plugin/ ` )
111117- ✅ Plugin loading/integration logic
112118- ✅ SkyCode-specific configurations
@@ -116,7 +122,7 @@ cd skycode-opencode
116122
117123When conflicts occur:
118124
119- 1 . ** Keep Minimal Changes in Fork** :
125+ 1 . ** Keep Minimal Changes in Fork** :
120126 - Only essential OpenCode core changes
121127 - Version compatibility fixes
122128 - Bundling-related modifications
@@ -156,11 +162,13 @@ git diff --stat upstream/main..HEAD
156162## Troubleshooting
157163
158164### Upstream Remote Not Found
165+
159166``` bash
160167git remote add upstream https://github.com/sst/opencode.git
161168```
162169
163170### Merge Conflicts
171+
164172``` bash
165173# See conflicted files
166174git status
@@ -178,11 +186,13 @@ git commit
178186If fork has drifted significantly:
179187
1801881 . ** Create backup branch** :
189+
181190 ``` bash
182191 git branch backup-before-reset
183192 ```
184193
1851942 . ** Reset to upstream** (if changes are in main repo):
195+
186196 ``` bash
187197 git fetch upstream
188198 git reset --hard upstream/main
@@ -194,6 +204,7 @@ If fork has drifted significantly:
194204 - Verify everything still works
195205
196206### Stale Remote
207+
197208``` bash
198209# Update remote URL if needed
199210git remote set-url upstream https://github.com/sst/opencode.git
@@ -214,6 +225,7 @@ git remote -v
214225## CI/CD Integration (Future)
215226
216227Consider adding automated sync checks:
228+
217229- Weekly check for upstream updates
218230- Notification when upstream has changes
219231- Automated test runs after sync
0 commit comments