On this page you will learn how to clone a modpack repository locally so you can work on it and contribute updates or fixes to it.
Step 1: Get the modpack locally
-
Fork the repository you want to work on, on GitHub.
-
Download the most recent
modrinth.index.json -
Use an archiving tool (
zip,7zip,WinRAR, etc.) to addmodrinth.index.jsonto a new archive. -
Change the file extension of the new archive to
.mrpack -
Create a new instance on the Modrinth App, or your launcher of choice, and import the .mrpack you just created.
-
Open the instance folder of the pack you just created in your terminal of choice.
-
Initialize a git repository in the instance folder
git init -
Add the GitHub remotes to the repository
git remote add origin git@github.com:<your_username>/<repo> git remote add upstream git@github.com:lucent-mc/<repo> -
Pull the
devbranch locallygit pull origin dev -
Rename the local branch to match the remote branch
git branch -m master dev -
Set up the local branch to track the remote branch.
git branch --set-upstream-to=origin/dev -
Sync the repository one final time
git pull --allIn a row, that’s
$USERNAME=<your_github_username>
$PROJECT=<repository_name>
git init
git remote add origin git@github.com:$USERNAME/$PROJECT
git remote add upstream git@github.com:lucent-mc/$PROJECT
git pull origin dev
git branch -m master dev
git branch --set-upstream-to=origin/dev
git pull --allContributing as a core maintainer
If you are a core maintainer (i.e. with write access to the upstream repositories), you will want to omit the steps setting up the fork on your own github account. Also omit setting up an
upstreamremote, and just work off theorigin.$PROJECT=<repository_name> git init git remote add origin git@github.com:lucent-mc/$PROJECT git pull origin dev git branch -m master dev git branch --set-upstream-to=origin/dev git pull --all
Step 2: Create a feature branch
To keep your progress separate from what other people might be working on, and keeping the
”trunk” clean, you should create a feature branch.
You can do this with gitflow-avh, or manually. To create a feature branch manually, please use the feat/ prefix.
git switch -C feat/<feature_name>Step 3: Make changes
Add mods, change configs, optimize keybinds. Do what you set out to do, and commit to your changes with git.
Step 3a: Export the new modrinth.index.json
- Export your pack using the Modrinth App or your launcher of choice.
- Extract the
modrinth.index.json. - Place it in the root of the repository.
- Push your changes.
Step 4: Make a Pull Request
When you’re happy with your changes / contributions, make a Pull Request on github, and wait for reviewers or maintainers.
Step 4a: Resolve any review requests
If a reviewer or maintainer requests any changes to your PR, address those and resolve the conversations.
Step 5: Enjoy
Congratulations! Your changes have been accepted! Now all you’ll have to do is wait for your changes to be included in a new version.