How to cherry-pick many commits between non-related repos.

Solution

git format-patch master..HEAD --stdout > ../mbox.patch
cd ../another-repo

Apply the changes (stopping for conflict resolution):

git am --3way --interactive ../mbox.patch

If there are conflicts in files you don’t care about, like go.sum:

git am --show-current-patch | git apply --exclude go.mod --exclude go.sum --exclude vendor
git add .
git am --resolved