0

we got a issue related git . one branch got merged to release branch , commit is displayed in history but no change reflected in code.

Latest Code: enter image description here

Changes missing : enter image description here

commit history : enter image description here

how to find what all changes are missing like this and resolve this ?

Jophy job
  • 1,924
  • 2
  • 20
  • 38
  • If it was me that had this problem I would try to re-do the merge to make sure someone didn't trip up merge conflict handling. If that doesn't provide an answer I would use `git bisect` to find the commit that incorrectly removed the changes. – Lasse V. Karlsen Aug 04 '21 at 11:10
  • @LasseV.Karlsen remerge not working .. we tried remerge , create new branch and get diff etc... only thing possible to get change back is "git cherry-pick " . but for that we first need to know what all commit have issue . let me try this git bisect . – Jophy job Aug 04 '21 at 11:16
  • Maybe it's just me, but I can't tell what's missing from those 2 screenshots. Cells [1,5] - [1,14] appear to be the same in both screenshots. – TTT Aug 04 '21 at 16:21
  • 1
    @TTT updated images to give more info . – Jophy job Aug 05 '21 at 09:41
  • OK, I see it now. 3 new lines and the others are shifted down and incremented, but they don't show up in the current source. You should be able to identify the merge commit that went bad by looking at where the commit in the second screenshot gets merged in. But that doesn't answer your question of how to find them all... – TTT Aug 05 '21 at 15:54
  • After thinking about this more, I think your question could benefit from some re-wording. Someone had a merge conflict, and made a mistake in the manual conflict resolution. You're asking how to detect when this happens, and perhaps more importantly, you want to know if there's a way you can run some commands against the history to detect if it already happened elsewhere. Is that right? – TTT Aug 05 '21 at 16:04
  • 1
    [Here's a related question](https://stackoverflow.com/questions/27683077/how-do-you-detect-an-evil-merge-in-git). It's a little different than yours, because "evil merges" are automatic merges that didn't have conflicts, but we wish they did because they introduce undesirable artifacts. It's probably impossible to detect "conflicts where a human *definitely* made a mistake". But it might be possible to detect "conflicts where a human *probably* made a mistake". – TTT Aug 05 '21 at 16:10

0 Answers0