Function: magit-reverse-in-index
magit-reverse-in-index is an interactive and byte-compiled function
defined in magit-apply.el.
Signature
(magit-reverse-in-index &rest ARGS)
Documentation
Reverse the change at point in the index but not the working tree.
Use this command to extract a change from HEAD, while leaving
it in the working tree, so that it can later be committed using
a separate commit. A typical workflow would be:
0. Optionally make sure that there are no uncommitted changes.
1. Visit the HEAD commit and navigate to the change that should
not have been included in that commit.
2. Type "u" (magit-unstage) to reverse it in the index.
This assumes that magit-unstage-committed is non-nil.
3. Type "c e" to extend HEAD with the staged changes,
including those that were already staged before.
4. Optionally stage the remaining changes using "s" or "S"
and then type "c c" to create a new commit.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-apply.el
(defun magit-reverse-in-index (&rest args)
"Reverse the change at point in the index but not the working tree.
Use this command to extract a change from `HEAD', while leaving
it in the working tree, so that it can later be committed using
a separate commit. A typical workflow would be:
0. Optionally make sure that there are no uncommitted changes.
1. Visit the `HEAD' commit and navigate to the change that should
not have been included in that commit.
2. Type \"u\" (`magit-unstage') to reverse it in the index.
This assumes that `magit-unstage-committed' is non-nil.
3. Type \"c e\" to extend `HEAD' with the staged changes,
including those that were already staged before.
4. Optionally stage the remaining changes using \"s\" or \"S\"
and then type \"c c\" to create a new commit."
(interactive)
(magit-reverse (cons "--cached" args)))