Pulling from fork

Hello
I’m trying to update Kade Engine from an older build to a newer build. Trying to use ‘git pull upstream master’ gives me the error
From GitHub - KadeDev/Kade-Engine: Kade Engine is a Competitive Rhythm Game engine rewrite for FNF with Qua

  • branch master → FETCH_HEAD
  • [new branch] master → upstream/master
    fatal: refusing to merge unrelated histories
    Would help a lot if it’s possible to make the ‘unrelated histories’ work.
    Thanks!

That error means that the branch you are trying to pull from upstream into your local branch don’t share a common history. If I’m understanding correctly the error, it’s not just about the two branches being out of synch (i.e. diverging due to some commit differences) but your repository not being a fork of the one you’re trying to pull from.

This is in theory possible, but I’m not sure it’s worth its while unless the two repositories have commonly shared directory structures, and overall the same file contents.

The only way I can think of in order to somehow join those histories is to create an orphan branch in your repository, and start by pulling in the upstream branch there. Then you could rebase the orphan branch on one of your branches, which would result in the orphan branch becoming attached to the HEAD of the branch you’ve rebased it on, but since all commit hashes will be recreated, you still won’t have any common history with upstream, you’d just be bringing in contents from it (might as well paste files then).

But there are a lot of buts to consider here…

First of all, if the upstream branch has too many commits then it might be unwieldy to handle, and you’re probably just better off copying and pasting its contents manually,

Also, orphan branches lead to all sort of quirky behavior in repositories.

If I’ve understood correctly, your repository is the older build, and the upstream the more recent one.
Wouldn’t it then make more sense to start working from the latter?

Of course, you know the details better, so you’ll have a better vision on what you want to achieve.

In general, trying to connect unrelated repositories is more headshakes than benefits. If at least you could find a common ancestor commit, even a very old one, it would all be simpler.