Skip to content

Instantly share code, notes, and snippets.

@gigaherz
Last active February 13, 2020 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gigaherz/ca256fea517cb925dfc31d7cd48c487e to your computer and use it in GitHub Desktop.
Save gigaherz/ca256fea517cb925dfc31d7cd48c487e to your computer and use it in GitHub Desktop.
How to make a PR to forge, step by step

How to make a PR to forge, steps

  1. create a personal fork if you don't yet have one

  2. clone the main repository to your pc, and add your personal fork as a secondary remote (after cloning) -- if you did it the other way around, it's fine, you just have to make sure you pull tags from the main repository, and not your fork!

    if you already have a local clone, fetch from the main repository to make sure you have the latest commit

  3. create a new work branch based off the correct branch, eg like, upstream/1.15.x

  4. run gradlew setup and gradlew gen*Runs

  5. do the thing and the changes, and test that it works as expected. write or update a test mod if the feature calls for it (as RenderNameplateEvent would)

  6. run gradlew build to make sure it doesn't error when building, and gradlew genPatches to update the patch files with your changes (I recommend doing that often, as a backup strategy)

  7. review your changes, to make sure your patch files didn't gain/lose import lines

  8. commit to your branch, and push the branch to your personal fork

  9. create the PR from the github site

Annex 1: repeat steps 5 to 8 if you have any followup changes from review comments, or you remember something you missed.

Annex 2: if you need to rebase your changes on top of a newer commit, first make sure you ran genPatches, then git fetch upstream the latest version from the main repository (upstream is whatever you named the remote, could be origin), and then rebase on top of like upstream/1.15.x, resolving any conflicts that may arise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment