mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-19 21:02:41 +00:00
4.4 KiB
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 commit6e2a9a4(old state) - The base branch (
fix/buff-suppression-pet-restore) has moved forward to commitb19503a - 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:
- Remove redundant commits that are now in the base branch
- Keep only the Levitate restoration feature
- Resolve all conflicts
Step-by-Step Instructions
Option 1: Manual Rebase (Recommended)
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-restoreat commitb19503a - 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:
- Check that you're on the correct branch:
git branch - Verify the base branch SHA:
git ls-remote origin fix/buff-suppression-pet-restore - If stuck during rebase:
git rebase --abortto start over - Check the PR status: https://github.com/Valorith/Server/pull/40
Additional Notes
- Why
--force-with-lease? This is safer than--forcebecause 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:
- Go to https://github.com/Valorith/Server/pull/40
- Check that "This branch has no conflicts with the base branch" appears
- Verify only 2 commits are shown
- Confirm the changes show only the Levitate restoration code