Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 2
Message 41 of 64

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

Thank you! It works in my case.

Ground Controller Lvl 2
Message 42 of 64

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

Thanks it worked for me

Highlighted
Ground Controller Lvl 2
Message 43 of 64

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

Yes it worked..!! Thanks a ton :)

Highlighted
Ground Controller Lvl 2
Message 44 of 64

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

Thanks...

this work for me...

 

git clone <Repo>

git pull --allow-unrelated-histories origin master

git push -u origin master

 

and it works

Highlighted
Ground Controller Lvl 1
Message 45 of 64

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

Worked perfectly in VS Code

Highlighted
Ground Controller Lvl 1
Message 46 of 64

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

if you already did a pull and you came up with master and origin/master but can't merge them, the following command can help you:

 

 

git merge origin/master --allow-unrelated-histories 

 

Highlighted
Ground Controller Lvl 1
Message 47 of 64

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

its working thanks man 

Highlighted
Ground Controller Lvl 2
Message 48 of 64

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

Yeah, it worked for me.

Highlighted
Ground Controller Lvl 2
Message 49 of 64

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

Its not working when I run the command on git bash.

$ git pull --allow-unrelated-histories
Result:  fatal: not a git repository (or any of the parent directories): .git

Highlighted
Ground Controller Lvl 1
Message 50 of 64

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

Someone please make this answer show up at the top of the thread lol! It fixed the problem for me and the current top positioned comment is completely the incorrect practice for solving the issue. Thanks again for correct pull to stop the unrelated histories error.