Variable: magit-unstage-committed

magit-unstage-committed is a customizable variable defined in magit-apply.el.

Value

t

Documentation

Whether unstaging a committed change reverts it instead.

A committed change cannot be unstaged, because staging and unstaging are actions that are concerned with the differences between the index and the working tree, not with committed changes.

If this option is non-nil (the default), then typing "u"
(magit-unstage) on a committed change, causes it to be
reversed in the index but not the working tree. For more information see command magit-reverse-in-index.

This variable was added, or its default value changed, in magit version 2.4.1.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-apply.el
(defcustom magit-unstage-committed t
  "Whether unstaging a committed change reverts it instead.

A committed change cannot be unstaged, because staging and
unstaging are actions that are concerned with the differences
between the index and the working tree, not with committed
changes.

If this option is non-nil (the default), then typing \"u\"
\(`magit-unstage') on a committed change, causes it to be
reversed in the index but not the working tree.  For more
information see command `magit-reverse-in-index'."
  :package-version '(magit . "2.4.1")
  :group 'magit-commands
  :type 'boolean)