Function: magit-stash-index

magit-stash-index is an autoloaded, interactive and byte-compiled function defined in magit-stash.el.

Signature

(magit-stash-index MESSAGE)

Documentation

Create a stash of the index only.

Unstaged and untracked changes are not stashed. The stashed changes are applied in reverse to both the index and the worktree. This command can fail when the worktree is not clean. Applying the resulting stash has the inverse effect.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-stash.el
;;;###autoload
(defun magit-stash-index (message)
  "Create a stash of the index only.
Unstaged and untracked changes are not stashed.  The stashed
changes are applied in reverse to both the index and the
worktree.  This command can fail when the worktree is not clean.
Applying the resulting stash has the inverse effect."
  (interactive (list (funcall magit-stash-read-message-function)))
  (magit-stash-save message t nil nil t 'worktree))