0

Recently, I have been asked by a friend to pull changes from remote repo into local. He told me that, at first, he copied the local repo as backup and then worked in that repo and pushed code to remote. Now in the orignal repo (from where he copied all the stuff) git pull was throwing this error message.

Can not merge two branches with unrelated history.

I don't know what exactly was the problem and I just want to recreate the scenario and generate same error message again. How can I recreate the same scenario? What are the possible reasons for above errors?

mallaudin
  • 4,744
  • 3
  • 36
  • 68
  • This is related, but only partly: http://stackoverflow.com/questions/37937984/git-refusing-to-merge-unrelated-histories (in particular your Git version must be 2.9 or later to see the error at all). – torek Nov 02 '16 at 11:03
  • You'll need to upgrade your Git to version 2.9 or later in order to reproduce it. Older versions of Git (including your 2.5.2) will merge unrelated histories without complaint. – torek Nov 02 '16 at 14:04
  • Thaks @torek. I have updated my git to 2.10 and now I can see the same error. – mallaudin Nov 02 '16 at 16:12

0 Answers0