git refusing to merge unrelated histories on rebase

C++
git merge upstream/master --allow-unrelated-histories

Source

Also in C++: