Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 21 of 49

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

Works for me too ! thank you :)

 

Ground Controller Lvl 2
Message 22 of 49

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

Thanks, Woked superbly for me as well.
but little more specific:

git pull <remote> <branch> --allow-unrelated-histories

Ground Controller Lvl 1
Message 23 of 49

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

Worked like a charm

Copilot Lvl 2
Message 24 of 49

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

I got this error, but found another cause:

somehow, the ssh url of another project got into this one's .git/config file.

 

So before running this to accept 'unrelated histories', you may want to confirm you have the right repo's url.

I fixed mine and it started working again.  :)

Copilot Lvl 2
Message 25 of 49

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

I tried the --allow-unrelated-histories and got this:

 

warning: Cannot merge binary files: biostats.final.3.2.pdf (HEAD vs. 93379526ed908abd4f58b2010eb055aace5df522)

warning: Cannot merge binary files: .DS_Store (HEAD vs. 93379526ed908abd4f58b2010eb055aace5df522)

Auto-merging <file name here>

CONFLICT (add/add): Merge conflict in <file name here>

Auto-merging <file name here>

CONFLICT (add/add): Merge conflict in  <file name here>

Auto-merging  <file name here>

CONFLICT (add/add): Merge conflict in  <file name here>

Auto-merging  <file name here>

CONFLICT (add/add): Merge conflict in  <file name here>

Auto-merging  <file name here>

Automatic merge failed; fix conflicts and then commit the result.

Copilot Lvl 2
Message 26 of 49

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

I just found that this git push problem really ruined a lot of my code. It is very very sad and frustrating. This is a huge problem for me and I wish I knew what to do to prevent it.

Ground Controller Lvl 2
Message 27 of 49

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

Worked for me. Thank you and God Bless! :)

Ground Controller Lvl 1
Message 28 of 49

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

Its work for me. Thanks 

Ground Controller Lvl 1
Message 29 of 49

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

thanks alot... ^^

Ground Controller Lvl 1
Message 30 of 49

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

Undebatably the most useful solution ever to the most non-sensical error message ever.