Function: magit-reset-hard

magit-reset-hard is an interactive and natively 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

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/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))