Function: magit-unstage-all

magit-unstage-all is an autoloaded, interactive and byte-compiled function defined in magit-apply.el.

Signature

(magit-unstage-all)

Documentation

Remove all changes from the staging area.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-apply.el
;;;###autoload
(defun magit-unstage-all ()
  "Remove all changes from the staging area."
  (interactive)
  (unless (magit-anything-staged-p)
    (user-error "Nothing to unstage"))
  (when (or (magit-anything-unstaged-p)
            (magit-untracked-files))
    (magit-confirm 'unstage-all-changes))
  (magit-run-before-change-functions nil "unstage")
  (magit-run-git "reset" "HEAD" "--" magit-buffer-diff-files)
  (magit-run-after-apply-functions nil "unstage"))