Our team's branching strategy is a mix between git-flow and trunk-based. A feature is developed in a branch, then deployed to a staging environment for approval, then merged into master and deployed to production. Lately a problem has been brought up that i don't even know how to search for.
I'll set up the context and then the problem.
At stage 1 we have a master branch deployed to prod, and two undeployed feature branches: green and orange. They may or may not be from the same dev team.
At stage 2, for testing and business purposes we need to have both unrelated features in a staging environment, so we create a staging/features
as a staging branch from master, and merge green and orange into it.
At stage 3 more work is put into those features and they go to the staging branch. Each feature remains independent because they get approvals from different stakeholders, so one being approved doesn't mean the other one is also approved, and one being approved does not require to "wait" for the other. They are independent from each other. The staging branch cannot be merged into a feature for the same reason (it'll carry the opposite feature).
At stage 4 green feature is approved to master, so it merges and all other features have to pull from master. Shortly after, orange is approved so it merges to master and the dev cycle ends.
Now the problem.
Stage 1 and 2 are similar but with 3 feature branches instead of 2.
At stage 3 development continues and the features are merged into the staging branch, all good.
At stage 4, blue wants to merge new code into staging but has conflicts with existing code.
If I solve the conflicts at the staging branch, that commit cannot be merged back into any feature, nor into master. I may even have conflicts with all the other features.
Today my solution is to remember which feature had conflicts and apply the fixes when both go into master, but it's extremely fragile. Keeping notes elsewhere is also prone to be forgotten when a merge is performed.
Is there a better way to keep solved conflicts in this branching strategy and not rely on a person's memory?