Advanced
Modpack Development with Git
Use Git to version-control your modpack — track changes, collaborate, and publish releases.
Last updated on
Why Git?
A Polymerium instance is already Git-friendly by design:
profile.jsonis the modpack definition — plain JSON, diffableimport/contains the distributable files — configs, resources, custom contentbuild/,live/,persist/are runtime artifacts that don't belong in version control
This means you can put an instance under Git and get meaningful diffs, branching, and collaboration.
Setting Up
- Initialize a Git repo in the instance directory:
cd instances/my-modpack
git init- Create a
.gitignore:
build/
live/
persist/
data.lock.json- Commit the initial state:
git add profile.json import/ icon.png README.md CHANGELOG.md
git commit -m "Initial modpack"What to Track
| File | Track? | Why |
|---|---|---|
profile.json | ✅ | The modpack definition — version, loader, mod list |
import/ | ✅ | Distributable files (configs, resources) |
| Icon / README / CHANGELOG | ✅ | Modpack metadata |
build/ | ❌ | Build artifact, reproducible |
live/ | ❌ | Working copy, personal |
persist/ | ❌ | Player data (saves, screenshots) |
data.lock.json | ❌ | Deploy cache, auto-generated |
Development Workflow
Iterating on Configs
- Launch the game and modify settings in-game.
- Changes land in
live/. - Open the Workspace to review diffs.
- Sync confirmed changes to
import/. - Commit:
git add import/
git commit -m "Tweak performance configs"Adding / Removing Mods
- Add or remove mods in Polymerium's Setup tab.
profile.jsonis updated automatically.- Commit:
git add profile.json
git commit -m "Add Sodium and Lithium"Switching Branches
You can use Git branches for experimental modpack versions:
git checkout -b experiment/new-loader
# Change loader in Polymerium, add/remove mods
git add profile.json import/
git commit -m "Switch to NeoForge"
# Test...
git checkout main # Go back to stableCollaboration
Sharing with Co-Authors
- Push the repo to a shared remote (GitHub, GitLab, etc.).
- Co-authors clone the repo into their
instances/directory. - Each person's
live/andpersist/are local and untracked. - Collaborate on
profile.jsonandimport/via normal Git workflows.
Publishing a Release
- Tag a release:
git tag v1.2.0
git push origin v1.2.0- Export the instance using Polymerium's export feature.
- Upload the exported modpack to CurseForge, Modrinth, or both.
Automating Exports with the CLI
You can skip the GUI and export from the command line using Trident CLI:
trident instance export my-modpack --format modrinth --output ./releases/This works well in CI/CD pipelines. For example, trigger an automatic build and export whenever you push a tag:
# .github/workflows/release.yml (simplified)
on:
push:
tags: ['v*']
steps:
- uses: actions/checkout@v4
- run: trident instance export my-modpack --format modrinth --output ./releases/
- # upload ./releases/* to Modrinth / CurseForgeSee the headless server guide for a full CI/CD example.
Tips
- Close Polymerium before Git operations — Polymerium may be watching
profile.jsonfor changes. Quit, do your Git work, then reopen. - Don't edit
profile.jsonmanually for version changes — it's safer to create a new instance and migrate packages. - Use the workspace as your staging area — it's purpose-built for the
live/→import/flow.