Function: magit-stash-both

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

Signature

(magit-stash-both MESSAGE &optional INCLUDE-UNTRACKED)

Documentation

Create a stash of the index and working tree.

Untracked files are included according to infix arguments. One prefix argument is equivalent to --include-untracked while two prefix arguments are equivalent to --all.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-stash.el
;;;###autoload
(defun magit-stash-both (message &optional include-untracked)
  "Create a stash of the index and working tree.
Untracked files are included according to infix arguments.
One prefix argument is equivalent to `--include-untracked'
while two prefix arguments are equivalent to `--all'."
  (interactive
    (progn (when (and (magit-merge-in-progress-p)
                      (not (magit-y-or-n-p "\
Stashing and resetting during a merge conflict.  \
Applying the resulting stash won't restore the merge state.  \
Proceed anyway? ")))
             (user-error "Abort"))
           (magit-stash-read-args)))
  (magit-stash-save message t t include-untracked t))