Function: magit-revert-and-commit

magit-revert-and-commit is an autoloaded, interactive and byte-compiled function defined in magit-sequence.el.

Signature

(magit-revert-and-commit COMMIT &optional ARGS)

Documentation

Revert COMMIT by creating a new commit.

Prompt for a commit, defaulting to the commit at point. If the region selects multiple commits, then revert all of them, without prompting.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-sequence.el
;;;###autoload
(defun magit-revert-and-commit (commit &optional args)
  "Revert COMMIT by creating a new commit.
Prompt for a commit, defaulting to the commit at point.  If
the region selects multiple commits, then revert all of them,
without prompting."
  (interactive (magit-revert-read-args "Revert commit"))
  (magit--cherry-pick commit args t))