Our project uses master as our "production" branch and staging as our "testing" branch. The normal flow of operations we desired was for developers to make changes on their development branches (branched off staging) and then merge into staging when they are done. We then do Integration type testing on the staging branch. If everything passes we wanted to then merge staging into master. In theory, staging and master shouldn't be too different than each other.
Our first shot at trying this, we got into a state where master had changes that staging did not, and vice-a-versa.
The way we solved this was we merged master into staging (fixing all the merge conflicts) and then merged staging into master (fixing all the merge conflicts).
If I do a
git compare <hash from master after merge from stagin>..<hash from staging after merge from master>
it returns nothing. I take this to mean that all the files are the same. This is what we expected.
However, if I use ... then it returns a ton of stuff.
GitLens (a git extension for VSCode) says the same:
Now every attempt to merge staging into master has a bunch of stuff, not just the changes that have been made since the last merge. However I don't believe most of the stuff are actually file differences.
To make maters worse, we have pushed changes into staging since the initial merging.
What do I need to do to go about fixing this?