Git · Senior · Question 19 of 76
Why can a revert of a merge cause trouble when the branch is merged again later?
- ✓Correct answer: Git considers those commits merged, so their changes stay reverted
- 2Git refuses to merge a branch that was ever reverted
- 3The second merge duplicates every commit of the branch
Explanation
The branch's commits are already ancestors of main, so the merge brings only newer commits. To restore the original work, revert the revert commit first.