Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Solution
Copilot Lvl 2
Message 11 of 78

Re: How to deal with "refusing to merge unrelated histories" error

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!

Highlighted
Ground Controller Lvl 1
Message 12 of 78

Re: How to deal with "refusing to merge unrelated histories" error

Thanks, worked fine for me.

Highlighted
Copilot Lvl 2
Message 13 of 78

Re: How to deal with "refusing to merge unrelated histories" error

Spoiler
force_refusing 
Spoiler
 
Highlighted
Copilot Lvl 2
Message 14 of 78

Re: How to deal with "refusing to merge unrelated histories" error

Compartir y fusionar, Match es Match.
Highlighted
Copilot Lvl 3
Message 15 of 78

Re: How to deal with "refusing to merge unrelated histories" error

I am in a similar situation where I am getting the same messages. Probably I just need to do the

 

 --allow-unrelated-histories

 

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.

Highlighted
Ground Controller Lvl 1
Message 16 of 78

Re: How to deal with "refusing to merge unrelated histories" error

It's worked for me.
Very thanks! i have solved my problem

Highlighted
Ground Controller Lvl 1
Message 17 of 78

Re: How to deal with "refusing to merge unrelated histories" error

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.

Highlighted
Ground Controller Lvl 1
Message 18 of 78

Re: How to deal with "refusing to merge unrelated histories" error

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.

Highlighted
Ground Controller Lvl 1
Message 19 of 78

Re: How to deal with "refusing to merge unrelated histories" error

 --allow-unrelated-histories

 

this was pretty much what was needed in my case.

Highlighted
Copilot Lvl 2
Message 20 of 78

Re: How to deal with "refusing to merge unrelated histories" error

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