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

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

 

 

git pull --allow-unrelated-histories

 

worked

Ground Controller Lvl 2
Message 12 of 19

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

This is great, thank you very much!

http://gph.is/1U7OwpV

Ground Controller Lvl 1
Message 13 of 19

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

This command is a dangerous one. "git pull --allow-unrelated-histories" it has messed up my whole codebase i dont know what happened and am not in a position to recover from it

 

Ground Controller Lvl 2
Message 14 of 19

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

Thanks, It works for me.

Ground Controller Lvl 1
Message 15 of 19

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

Works for me too ! thank you :)

 

Ground Controller Lvl 2
Message 16 of 19

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 17 of 19

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

Worked like a charm

Copilot Lvl 2
Message 18 of 19

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.  :)

Highlighted
Ground Controller Lvl 1
Message 19 of 19

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

 I was also facing the same problem. But I realised I was trying to push my one git project material on other remote git project. Solution:

Clone the fresh project again and this time make sure cloning link is starting from ssh if you have added the SSH key and https:// if you have added the puttyKey.