From cb64e33c2002bc60c23e286c712e198276c2017e Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sun, 16 May 2021 09:29:19 -0700 Subject: [PATCH] [CI-SKIP] Add PR rebasing steps (#5634) --- CONTRIBUTING.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ad3a075e58..4eae2989c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,7 @@ To generate and update the TOC: https://github.com/mzlogin/vim-markdown-toc --> * [Manual method](#manual-method) * [Automatic method](#automatic-method) * [PR Policy](#pr-policy) +* [Rebasing PRs](#rebasing-prs) * [Formatting](#formatting) * [Patch Notes](#patch-notes) * [Obfuscation Helpers](#obfuscation-helpers) @@ -238,6 +239,21 @@ need to "save" the changes. - This will modify the appropriate patches based on your commits. 1. PR your modified patch file(s) back to this repository. +## Rebasing PRs + +Steps to rebase a PR to include the latest changes from `master`. +These steps assume the `origin` remote is your fork of this repository and `upstream` is the official PaperMC repository. + +1. Pull latest changes from upstream's master: `git checkout master && git pull upstream master`. +1. Checkout feature/fix branch and rebase on master: `git checkout patch-branch && git rebase master`. +1. Apply updated patches: `./paper patch`. +1. If there are conflicts, fix them. +1. If your PR creates new patches instead of modifying exist ones, in both the `Paper-Server` and `Paper-API` directories, ensure your newly-created patch is the last commit by either: + * Renaming the patch file with a large 4 digit number in front (e.g. 9999-Patch-to-add-some-new-stuff.patch) + * Run `git rebase --interactive upstream/upstream` and move the commits to the end. +1. Rebuild patches: `./paper rebuild`. +1. Force push changes: `git push --force`. + ## PR Policy We'll accept changes that make sense. You should be able to justify their