Command
git revert
Record an inverse change as a new commit; the original stays in history. Start clean; conflicts may require resolution. Merge commits need a mainline parent.
Formal Syntax & Structure
git syntaxgit
git revert [--no-edit] COMMITWorking Example
Example Snippetgit
git revert --no-edit HEAD