Function: diff-hl-unstage-file
diff-hl-unstage-file is an interactive and natively compiled function
defined in diff-hl.el.
Signature
(diff-hl-unstage-file)
Documentation
Unstage all changes in the current file.
Only supported with Git.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/cfz56rl3lp066226i0bmmgiicls3gcq7-emacs-packages-deps/share/emacs/site-lisp/elpa/diff-hl-20261001.135/diff-hl.el
(defun diff-hl-unstage-file ()
"Unstage all changes in the current file.
Only supported with Git."
(interactive)
(let ((file (diff-hl--buffer-file-name)))
(unless file
(user-error "No current file"))
(diff-hl--ensure-staging-supported)
(vc-git-command nil 0 file "reset")
(message "Unstaged all")
(unless diff-hl-show-staged-changes
(diff-hl-update))))