Function: magit-unstage-files

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

Signature

(magit-unstage-files FILES)

Documentation

Read one or more files and unstage all changes to those files.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-apply.el
;;;###autoload
(defun magit-unstage-files (files)
  "Read one or more files and unstage all changes to those files."
  (interactive
    (let* ((choices (magit-staged-files))
           (default (or (magit-section-value-if 'file)
                        (magit-file-relative-name)))
           (default (car (member default choices))))
      (list (magit-completing-read-multiple "Unstage file,s: " choices
                                            nil t nil nil default))))
  (magit-with-toplevel
    (magit-unstage-1 files)))