Merge Conflict issues #142348
-
We have a release branch where all feature branches are merged, and for bug fixes, we create new branches from the release, fix the issue, and raise a PR to merge back. I created a new Dev branch from the release, made my changes, and raised a PR to the release branch, which showed a merge conflict. During conflict resolution, only two files had differences: one from my changes and another from someone else's. I resolved the conflict, and since the PR was already approved, I merged it without noticing any differences in the diff. A new commit was created for the merge conflict, and everything seemed fine at the time. However, after my merge, several changes were made to the release branch by other developers. By resolving the conflict in my Dev branch, I unintentionally aligned the pointers of the release and dev branches, causing changes made after the creation of my dev branch to be lost. Now I can see the unintended impact of my conflict resolution, and some changes are missing from the release branch. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The situation you described is a common issue that occurs when merging branches with conflicts in a fast-moving release environment. Here is a rough plan of what you can:
Please let me know if this works. I can reply with git commands to perform some of these tasks. |
Beta Was this translation helpful? Give feedback.
-
It sounds like the issue occurred because the conflict resolution unintentionally aligned your dev branch with an older version of the release branch, which caused you to overwrite recent changes made by others. Here are a few steps you could take to resolve this: Identify the missing changes: Check the commit history of the release branch to identify the changes that were lost after your merge. Create a new branch: From the current release branch, create a new branch and cherry-pick the missing commits or reapply the changes that were overwritten. Re-merge the missing changes: Once the changes are restored, you can open a new pull request to merge them back into the release branch. Improve conflict resolution process: Going forward, be sure to double-check the diff and consider testing the branch in a staging environment after resolving conflicts to avoid similar issues. |
Beta Was this translation helpful? Give feedback.
The situation you described is a common issue that occurs when merging branches with conflicts in a fast-moving release environment. Here is a rough plan of what you can:
Please let me know if this works. I can reply …