Imagine this scenario:
master: M
release-candidate: \ A--B'--C'
feature-A: \-A-/ / /
feature-B: \-B--/ /
feature-C: \--C---/
The release-candidate was created by using the following commands:
git co master
git co -b release-candidate
git merge feature-A (FAST FORWARD)
git merge feature-B (REGULAR MERGE)
git merge feature-C (REGULAR MERGE)
Let's say during our pre-release testing we find a problem with feature A. How do we undo the changes introduced by the fast-forward merge of this feature branch into the release-candidate branch?
We could potentially reset release-candidate back to its master state and start merging all the valid features again but this would mean repeating a lot of merge conflict resolution and introduces the possibility for error.
Note also that I've only shown a single commit on each of the feature branches but a solution should work in the case where there is more than one commit to undo.