git revert : Undoing Commit Safely
Theory
- Used to undo a commit safely
- Creates a new commit that reverses the changes of a previous commit
- Does not rewrite history (safe for shared/public branches)
- Preferred over
git resetonmain/master - Fixing it old mistake without erase it.
Commands
- Opens an editor to confirm the revert commit message
- The original commit remains in history

Summary
reset→ removes commits (history rewrite)revert→ adds a new commit to undo changes