Function: magit-cherry-harvest
magit-cherry-harvest is an autoloaded, interactive and byte-compiled
function defined in magit-sequence.el.
Signature
(magit-cherry-harvest COMMITS BRANCH &optional ARGS)
Documentation
Move COMMITS from another BRANCH onto the current branch.
Remove the COMMITS from BRANCH and stay on the current branch. If a conflict occurs, then you have to fix that and finish the process manually.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-sequence.el
;;;###autoload
(defun magit-cherry-harvest (commits branch &optional args)
"Move COMMITS from another BRANCH onto the current branch.
Remove the COMMITS from BRANCH and stay on the current branch.
If a conflict occurs, then you have to fix that and finish the
process manually."
(interactive
(magit--cherry-move-read-args "harvest" nil
(lambda (commits)
(list (let ((branches (magit-list-containing-branches (car commits))))
(pcase (length branches)
(0 nil)
(1 (car branches))
(_ (magit-completing-read
(let ((len (length commits)))
(if (= len 1)
"Remove 1 cherry from branch"
(format "Remove %s cherries from branch" len)))
branches nil t))))))))
(magit--cherry-move commits branch (magit-get-current-branch) args nil t))