Function: magit-cherry-donate
magit-cherry-donate is an interactive and natively 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
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-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))