Asked about Git as you actually use it

How do you undo a commit that is already on the shared branch?

An answer that works

git revert, which adds a new commit undoing the change. Reset rewrites history and breaks everyone who already pulled it.

Reading an answer is not being able to give one. The section that teaches this is Git as you actually use it, 5 hours of Git & collaboration.

Learn this properly