Function: magit-reset-hard

magit-reset-hard is an autoloaded, interactive and byte-compiled function defined in magit-reset.el.

Signature

(magit-reset-hard COMMIT)

Documentation

Reset the HEAD, index, and working tree to COMMIT.

(git reset --hard COMMIT)

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-reset.el
;;;###autoload
(defun magit-reset-hard (commit)
  "Reset the `HEAD', index, and working tree to COMMIT.
\n(git reset --hard COMMIT)"
  (interactive (list (magit-reset-read-branch-or-commit
                      (concat (magit--propertize-face "Hard" 'bold)
                              " reset %s to"))))
  (magit-reset-internal "--hard" commit))