Function: magit-reset-index

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

Signature

(magit-reset-index COMMIT)

Documentation

Reset the index to COMMIT.

Keep the HEAD and working tree as-is, so if COMMIT refers to the head this effectively unstages all changes.

(git reset COMMIT .)

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-reset.el
;;;###autoload
(defun magit-reset-index (commit)
  "Reset the index to COMMIT.
Keep the `HEAD' and working tree as-is, so if COMMIT refers to the
head this effectively unstages all changes.
\n(git reset COMMIT .)"
  (interactive (list (magit-read-branch-or-commit "Reset index to")))
  (magit-reset-internal nil commit "."))