Function: magit-stash-branch

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

Signature

(magit-stash-branch STASH BRANCH)

Documentation

Create and checkout a new BRANCH from an existing STASH.

The new branch starts at the commit that was current when the stash was created. If the stash applies cleanly, then drop it.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-stash.el
;;;###autoload
(defun magit-stash-branch (stash branch)
  "Create and checkout a new BRANCH from an existing STASH.
The new branch starts at the commit that was current when the
stash was created.  If the stash applies cleanly, then drop it."
  (interactive (list (magit-read-stash "Branch stash")
                     (magit-read-string-ns "Branch name")))
  (magit-run-git "stash" "branch" branch stash))