|
| 1 | +# Upgrading OpenCode Game Studios |
| 2 | + |
| 3 | +This guide covers upgrading your existing game project repo from one version of the template to the next. |
| 4 | + |
| 5 | +## Upgrade Strategies |
| 6 | + |
| 7 | +There are three ways to pull in template updates. Choose based on how your repo is set up. |
| 8 | + |
| 9 | +### Strategy A — Git Remote Merge (recommended) |
| 10 | + |
| 11 | +Best when: you cloned the template and have your own commits on top of it. |
| 12 | + |
| 13 | +```shell |
| 14 | +# Add the template as a remote (one-time setup) |
| 15 | +git remote add template https://github.com/striderZA/OpenCodeGameStudios.git |
| 16 | + |
| 17 | +# Fetch the new version |
| 18 | +git fetch template main |
| 19 | + |
| 20 | +# Merge into your branch |
| 21 | +git merge template/main --allow-unrelated-histories |
| 22 | +``` |
| 23 | + |
| 24 | +Git will flag conflicts only in files that both the template *and* you have changed. Resolve each one — your game content goes in, structural improvements come along for the ride. Then commit the merge. |
| 25 | + |
| 26 | +**Tip:** The files most likely to conflict are `AGENTS.md` and `opencode.json`, because you've filled them in with your engine and project settings. Keep your content; accept the structural changes. |
| 27 | + |
| 28 | +### Strategy B — Cherry-pick specific commits |
| 29 | + |
| 30 | +Best when: you only want one specific feature (e.g., just the new command, not the full update). |
| 31 | + |
| 32 | +```shell |
| 33 | +git remote add template https://github.com/striderZA/OpenCodeGameStudios.git |
| 34 | +git fetch template main |
| 35 | + |
| 36 | +# Cherry-pick the specific commit(s) you want |
| 37 | +git cherry-pick <commit-sha> |
| 38 | +``` |
| 39 | + |
| 40 | +Commit SHAs for each version are listed in the version sections below. |
| 41 | + |
| 42 | +### Strategy C — Manual file copy |
| 43 | + |
| 44 | +Best when: you didn't use git to set up the template (just downloaded a zip). |
| 45 | + |
| 46 | +1. Download or clone the new version alongside your repo. |
| 47 | +2. Copy the files listed under **"Safe to overwrite"** directly. |
| 48 | +3. For files under **"Merge carefully"**, open both versions side-by-side and manually merge the structural changes while keeping your content. |
0 commit comments