This may just be due to my own ignorance about Git and/or GitLab, but I am seeing something odd on a particular branch in our repository and I haven’t been able to figure out why.
We have a development branch which we have introduced a good number (100+) of commits to and plan to merge into our production branch soon. However, I have noticed at least two commits which appear to have the same changes. They are two separate commits with separate parents, but one is the result of a Merge Request (with squashed commits) and the other appears to be a regular commit.
This doesn’t appear to affect the code that would be going into the Production branch, but it seems odd that two commits would both show the same code being added to line 94 of a given file, for example. My understanding of Git is that the subsequent commit should not have anything to add, since the line was already added in the preceding commit.
We interact with GitLab via a 3rd party application, Looker, which provides Git functionality via an IDE. Not sure if this may be part of why we are seeing odd behavior.
It shakes my confidence in the integrity of the branch without knowing more so hoping to get a better understanding of why this might happen, whether it’s an issue, and how it may be avoided in the future.
Does anyone else have experience with this or something similar?