Function: magit-file-unstage

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

Signature

(magit-file-unstage)

Documentation

Unstage all changes to the file being visited in the current buffer.

Key Bindings

Aliases

magit-unstage-buffer-file (obsolete since Magit 4.3.2)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-files.el
;;;###autoload
(defun magit-file-unstage ()
  "Unstage all changes to the file being visited in the current buffer."
  (interactive)
  (unless buffer-file-name
    (user-error "Not visiting a file"))
  (magit-with-toplevel
    (magit-unstage-1 (list (magit-file-relative-name)))))