Function: magit-subtree-add

magit-subtree-add is an autoloaded, interactive and byte-compiled function defined in magit-subtree.el.

Signature

(magit-subtree-add PREFIX REPOSITORY REF ARGS)

Documentation

Add REF from REPOSITORY as a new subtree at PREFIX.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-subtree.el
;;;###autoload
(defun magit-subtree-add (prefix repository ref args)
  "Add REF from REPOSITORY as a new subtree at PREFIX."
  (interactive
    (cons (magit-subtree-prefix 'magit-subtree-import "Add subtree")
          (let ((remote (magit-read-remote-or-url "From repository")))
            (list remote
                  (magit-read-refspec "Ref" remote)
                  (magit-subtree-arguments 'magit-subtree-import)))))
  (magit-git-subtree "add" prefix args repository ref))