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/is the Run Directory; it can contain personal data, so keep it out of Git and back it up separately when needed.persist/is Local Data and should stay private.
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/
persist/
data.lock.json- Commit the initial state:
git add profile.json import/
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) |
Imported native patches (patches/data.patch.json, patches/import/) | ✅ If used | Launch declarations that travel with a Trident modpack |
build/ | ❌ | Runtime output; may contain saves and other data not backed up elsewhere |
persist/ | ❌ | Player data (saves, screenshots) |
data.lock.json | ❌ | Deploy cache, auto-generated |
Development Workflow
On the instance home page, the development overview widget summarizes Git status, Pack Source files, unsynced working-copy changes, patches, release attachments, and the last run. Its compact view hides categories with nothing to report. Open Workspace to review individual file changes.
Iterating on Configs
- Launch the game and modify settings in-game.
- Changes land in
build/. - 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
build/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 promoting in-game changes from
build/intoimport/.