Git

What is the difference between git reset and git revert?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

git revert creates a new commit which undoes the changes from last commit.

git reset depends on the usage, can modify the index or change the commit which the branch head is currently pointing at.