I ended in the same situation after a series of mishapps. Have a look at this thread : I just did a
git pull --allow-unrelated-histories
and it was fixed!
I am in a similar situation where I am getting the same messages. Probably I just need to do the
But I wish I knew what situations where I should not. Obviously we get the message because there might sometimes be a good reason to not do the allow. I got into my situation because I did not know what I was doing and did something I should not have.
Probably because you did a `git init` on something like "the same" set of files locally, then tried to merge with the files on the repository. The better way is to clone from the repository, then work from that.
I had just created a README.md while initiating a new Repositoy. after adding remote origin the issue rised on git pull. but this is really helful to solve my problem.
Did you ever find out the answer? I'm not sure how I got in this situation and I've been using git for a decade so this isnt nessisarily a clear user error issue all of the time. AFAIK I did nothing wrong