Function: magit-cherry-donate

magit-cherry-donate is an autoloaded, interactive and byte-compiled function defined in magit-sequence.el.

Signature

(magit-cherry-donate COMMITS BRANCH &optional ARGS)

Documentation

Move COMMITS from the current branch onto another existing BRANCH.

Remove COMMITS from the current branch and stay on that branch. If a conflict occurs, then you have to fix that and finish the process manually. HEAD is allowed to be detached initially.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-sequence.el
;;;###autoload
(defun magit-cherry-donate (commits branch &optional args)
  "Move COMMITS from the current branch onto another existing BRANCH.
Remove COMMITS from the current branch and stay on that branch.
If a conflict occurs, then you have to fix that and finish the
process manually.  `HEAD' is allowed to be detached initially."
  (interactive
    (magit--cherry-move-read-args "donate" t
      (lambda (commits)
        (list (magit-read-other-branch
               (let ((len (length commits)))
                 (if (= len 1)
                     "Move 1 cherry to branch"
                   (format "Move %s cherries to branch" len))))))
      'allow-detached))
  (magit--cherry-move commits
                      (or (magit-get-current-branch)
                          (magit-rev-parse "HEAD"))
                      branch args))