Git · Junior · Question 31 of 75

When is git reset risky and git revert preferable?

Explanation

Reset rewrites history; teammates who have the old commits will get confusing divergence. For published history add a reverting commit instead.

Further reading

Problem with a question

Git · Junior · question 31

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