I am migrating my Gerrit repository into GitHub. The repository has around 10,000 commits and I want to migrate the commit history too into GitHub. To make this work I have carried out the following steps:-
Changed the remote URL of the Gerrit repo to point at the empty GitHub repo -
git remote set-url origin https://github.com/myorg/myproject.gitCreated a replica of the
masterbranch locally -git checkout -b MasterReplicaMerged
origin/mainbranch intoMasterReplicabranch allowing unrelated histories -git merge --allow-unrelated-histories -m "Merging branches from 2 repos" origin/mainPushed
MasterReplicato origin -git push -u origin MasterReplicaRaised pull request on
origin/MasterReplicato be merged intoorigin/mainClicked on
Rebase and Mergewhich throws error -> "This branch cannot be rebased due to too many changes"
Looks like GitHub cannot merge a PR with too many commits hence the error. Is there any workaround to get this done? Thanks.