Function: magit-file-unstage

magit-file-unstage is an interactive and natively 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

This command is not in any keymaps.

Aliases

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

Source Code

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