`git reset` vs `git revert`?

IntermediateConceptGit
Answer

reset moves the branch pointer back and rewrites history, so use it on local work only. revert adds a new commit that undoes an old one, which makes it safe on shared branches like main.

All Real-World Interview questions Roadmap: Interview readiness

More on Git