Let's say I have a
branches, one with the stable/released version (master) of the code, the other unstable (dev) with unfinished work in progress.
I started coding a test suite branching from DEV, which now should be included (or "released") into master.
The problem is that for a while the branch has been kept updated with DEV, and now there are merged commits from other branches that should not be merged to MASTER.
The commits are properly marked and we know for sure specifically which they are.
The new code to be included in release is part of a test suite, so it doesn't change the source code, therefore it should not be any major problem in rolling back all the unwanted changes/commits from the source code.
The question(s) would be:
Is there a pre-defined methodology to do this? And where is this methodology outlined, if any?
I can research a bit on git to find "my way" to do this safely, but it sounds like a classic case of something which is likely to happen in any standard development process, and in my experience usually there is already a predefined methodology outlined by former (and heroic) developers in their quest for a solid development methodology.
If no methodology is available, or known, any advice would be appreciated.