Git · Senior · Question 19 of 76

Why can a revert of a merge cause trouble when the branch is merged again later?

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.

Further reading

Problem with a question

Git · Senior · question 19

Test yourself

Take the Git · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz