Git · Junior · Question 23 of 75

How do you abort a merge that has conflicts and go back to the previous state?

Explanation

--abort restores the branch and working tree to how they were before the merge started. For a rebase the equivalent is git rebase --abort.

Further reading

Problem with a question

Git · Junior · question 23

Test yourself

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

Take this quiz