Branches Merge Request Problem¶
On May 12th I created a merge request to add the powerup functionality I created
in the ‘feature-powerup’ branch into the ‘development’ branch.
In this branch I had created two scripts that would manage the names and thresholds of
powerups and would display the current powerup in chat for Marwan to work with for UI.
However what I had overlooked was that instead of merging into ‘development’, I accidentally merged into ‘main’ instead. A couple more commits have been made in ‘main’ since then, so we didn’t want to revert the merger and undo the work.
So I convened with Marwan and Valentijn to discuss our best course of action.
Since Marwan had taken upon himself to fix some compiler issues in ‘main’,
we agreed keeping that change would be important.
We ultimately settled on following these steps:
- Test the ‘main’ branch and note any issues.
- Test the ‘development’ branch and note any issues.
- Merge ‘development’ into ‘main’, test and note any issues.
- Merge ‘main’ into ‘development’, test and note any issues.
We realised that since we merged ‘feature-powerup’ into ‘main’, the new features
we created were on the ‘main’ branch as well.
This means that the roles of ‘main’ and ‘development’ were essentially
reversed.
So the best course of action now would be to test the individual branches,
merge ‘development’ into ‘main’ to see if there are any errors and then
merge the finalized ‘main’ into ‘development’ to make them the same and allow
us to work from ‘development’ there after once again.
In the sections below I document what I found for each step:
Test the main branch¶
Current functioning features:
- Player movement
- Player shooting
- Player healthbar
- Enemy movement
- Enemy collision
- PowerupManager Debug.Log
- PowerupUI on-screen text (Press P to show)
No errors were detected.
Test the development branch¶
Current functioning features:
- Player movement
- Player shooting
- Player healthbar
- In this version, if the player shoots it will lower the player healthbar for testing
- Enemy movement
- Enemy collision
No errors were detected.
Merge development into main¶
No errors were detected.
The self damaging from the ‘development’ branch was still present. This was patched by tweaking the ContainsLayer variable in Utility.cs.
With all issues resolved, it was ready for the final merge.
Merge main into development¶
No errors were detected.
The merge went smoothly and the problem has been resolved.