I am trying to help a colleague find out that in his recent merge there were a lot of warnings about "empty commit". I opened gitk and saw something like this:
_o (Z) Merge branch 'new-branch' (yesterday) o | (Y) Fix bad merge (person 1) o_| (X) Merge branch 'master' into new-branch (recent) o | (W) Last legitimate commit that belongs on new-branch (person 1) | | ... work on master ... o | (F) Legitimate commit that actually belongs on new-branch (person 2) | | ... work on master ... o | (E) Legitimate commit that should have been on master (person 2) o | (D') Even more work etc... (committed by person 2) o | (C') More work in master (committed by person 2) o | (A') Normal work in master (committed by person 2) | o (D) Even more work etc... (authored by random person) | o (C) More work in master (authored by random person) o | (B) Starting to work on new-branch (person 1) |_o (A) Normal work in master (authored by random person) o Common Ancestor (weeks ago)
Thus, it is obvious that the two people working on this industry should more often unite with the master in their industry, and then these piles of merger warnings would be more obvious. A member of the team whose name was in the committer field of the duplicate commits says that he probably did pull-rebbase to call them, but I can't wrap my head around how this might work. Can someone explain what could happen?
I'm not looking for a way to fix merge warnings, as they looked benign. I just want to understand what happened so that I can prevent this from happening again. My team is relatively new to git, so I'm trying to help them figure it out one small step at a time, using the trial version and the error for the most part.
Thanks!
source share