Function: magit-stash-push
magit-stash-push is an interactive and natively compiled function
defined in magit-stash.el.
Signature
(magit-stash-push &optional ARG1 ARG2)
Documentation
Create stash using "git stash push".
This differs from Magit's other stashing commands, which don't use "git stash" and are generally more flexible but don't allow specifying a list of files to be stashed.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-stash.el
;;;###autoload(autoload 'magit-stash-push "magit-stash" nil t)
(transient-define-prefix magit-stash-push (&optional transient args)
"Create stash using \"git stash push\".
This differs from Magit's other stashing commands, which don't
use \"git stash\" and are generally more flexible but don't allow
specifying a list of files to be stashed."
:man-page "git-stash"
["Arguments"
(magit:-- :reader (lambda (prompt initial-input history)
(magit-read-files prompt initial-input history
#'magit-modified-files)))
("-u" "Also save untracked files" ("-u" "--include-untracked"))
("-a" "Also save untracked and ignored files" ("-a" "--all"))
("-k" "Keep index" ("-k" "--keep-index"))
("-K" "Don't keep index" "--no-keep-index")]
["Actions"
("P" "push" magit-stash-push)]
(interactive (if (eq transient-current-command 'magit-stash-push)
(list nil (transient-args 'magit-stash-push))
(list t)))
(if transient
(transient-setup 'magit-stash-push)
(magit-run-git "stash" "push"
(seq-filter #'atom args)
(assoc "--" args))))