We're running GitLab as our central Git repo and using TortoiseGit locally along with VS2010 SP1 as our main IDE, developing ASP.NET application. We've transitioned from TFVC to GIT 2 months back and we are still newbies. We branches on every bug fixes and we only use merge with no-ff exclusively for now.
We're working on a new feature branch, and there's 4 developers working on it excluding myself. Last week we discovered that some production bug fixes which were merged into this feature branch were overwritten by one of the developer (dev-A). Upon investigation, we suspected that dev-A might have commit an older version of the code in his local repo, and subsequently pushed it to the server. We couldn't find out the exact thing that he did as he wasn't sure himself and this happened about 3 weeks ago.
When we checked the commit network in the logs and also on GitLab, there appears to be 2 lines where on one line, dev-A committed the conflicting code locally and continue working before pushing to the server 2 weeks later and the other line where the maintenance team merged the last production bug fixes. The line converge when when dev-A did a pull from server and merge and the first conflict happened. I assisted him and noticed the large number of conflicts, but I was assuming it's normal, although the conflicts are not conflicts at all, i.e. 0 line vs few lines of code. After that when the next developer (dev-B) pull from server to get the latest code, the same list of files appears in the merge and with the same conflicts. This is when we started to suspect something. Our initial investigation also found that some bug fixes were actually reversed.
We've got everyone to push to their own branches for now (feature-name), while we try to access the situation. We're worried that the conflicts will keep going round and round as we pull/merge/push. I wonder if we need to go back in history to delete that particular offending commit but We would like to retain the rest of the useful history. Any pointers to investigate and to move forward would be helpful.
Thanks and sorry for the lengthy explanation.