eqemu-server/REBASE_INSTRUCTIONS.md
copilot-swe-agent[bot] 0e15b58ba9 Add comprehensive rebase instructions for PR #40
Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
2026-01-31 14:52:21 -05:00

4.4 KiB

Instructions to Resolve PR #40 Merge Conflicts

Current Situation

Problem: PR #40 has merge conflicts because:

  • Your PR branch (copilot/sub-pr-39) is at commit 6e2a9a4 (old state)
  • The base branch (fix/buff-suppression-pet-restore) has moved forward to commit b19503a
  • The base branch now includes fixes that were in your PR, causing conflicts
  • GitHub shows the PR as not mergeable (mergeable: false, mergeable_state: "dirty")

Why this happened: The base branch was updated with the return false;return; fix and nimbus effect restoration that were originally part of your PR. Now those commits are redundant and causing conflicts.

Solution: Rebase Your Branch

You need to rebase your PR branch onto the latest base branch. This will:

  1. Remove redundant commits that are now in the base branch
  2. Keep only the Levitate restoration feature
  3. Resolve all conflicts

Step-by-Step Instructions

Run these commands in your local repository:

# 1. Make sure you're on the PR branch
git checkout copilot/sub-pr-39

# 2. Fetch the latest changes
git fetch origin

# 3. Rebase onto the latest base branch
git rebase origin/fix/buff-suppression-pet-restore

# 4. When git reports a conflict in the validation check, skip it (it's redundant)
#    Git will show a conflict like:
#    <<<<<<< HEAD
#    if (!IsValidSpell(buffs[slot].spellid))
#        return;
#    =======
#    if (!IsValidSpell(buffs[slot].spellid)) {
#        return;
#    }
#    >>>>>>> (your commit)
#
#    Skip this commit since the base already has the fix:
git rebase --skip

# 5. Git will automatically drop the "Resolve merge conflict" commit
#    The rebase should complete successfully

# 6. Force-push the rebased branch
git push --force-with-lease origin copilot/sub-pr-39

Option 2: Using GitHub CLI

If you have GitHub CLI installed:

# Update the PR branch
gh pr checkout 40
git fetch origin
git rebase origin/fix/buff-suppression-pet-restore
git rebase --skip  # When prompted about the validation conflict
git push --force-with-lease origin copilot/sub-pr-39

Option 3: Reset and Cherry-pick

If the rebase seems complicated, you can reset to the base and cherry-pick only the Levitate commit:

# 1. Fetch latest
git fetch origin

# 2. Create a backup of your current branch
git branch copilot/sub-pr-39-backup

# 3. Reset your branch to the base
git checkout copilot/sub-pr-39
git reset --hard origin/fix/buff-suppression-pet-restore

# 4. Cherry-pick only the Levitate restoration commit (03f7704)
git cherry-pick 03f7704

# 5. Force-push
git push --force-with-lease origin copilot/sub-pr-39

Expected Result

After successful rebase, your branch will have:

  • 2 commits total:
    • Initial plan commit
    • Levitate restoration commit
  • Base: fix/buff-suppression-pet-restore at commit b19503a
  • No conflicts - the PR will be mergeable

The validation fix and nimbus restoration will be inherited from the base branch, not part of your PR's changes.

What Changed

Before Rebase:

  • 4 commits in your PR
  • Includes validation fix (return false;return;)
  • Includes merge conflict resolution commit
  • Conflicts with base branch

After Rebase:

  • 2 commits in your PR
  • Only Levitate restoration feature
  • Clean history based on latest base branch
  • No conflicts

Files Affected

Your PR will only modify:

  • zone/spell_effects.cpp - Lines 4722-4735 (Levitate case added to switch statement)

Need Help?

If you encounter issues:

  1. Check that you're on the correct branch: git branch
  2. Verify the base branch SHA: git ls-remote origin fix/buff-suppression-pet-restore
  3. If stuck during rebase: git rebase --abort to start over
  4. Check the PR status: https://github.com/Valorith/Server/pull/40

Additional Notes

  • Why --force-with-lease? This is safer than --force because it won't overwrite the remote branch if someone else pushed to it
  • Why skip the validation commit? The base branch already has return; (correct), so your commit adding the same fix is redundant
  • Is this safe? Yes, rebasing removes redundant commits while keeping your Levitate feature intact

Verification

After pushing, verify on GitHub:

  1. Go to https://github.com/Valorith/Server/pull/40
  2. Check that "This branch has no conflicts with the base branch" appears
  3. Verify only 2 commits are shown
  4. Confirm the changes show only the Levitate restoration code