Trying to pull files from my Github repository: “refusing to merge unrelated histories”

前端 未结 8 517
傲寒
傲寒 2020-12-04 05:34

I\'m learning git, and I\'m following the Git community book.

Previously (long time ago) I made a public repository on Github, with some files. Now I set up a local

8条回答
  •  甜味超标
    2020-12-04 06:02

    In my case was facing the same issue, especially the first pull request trying after remotely adding a Git repository. The following error was facing.

    fatal: refusing to merge unrelated histories on every try
    

    Use the --allow-unrelated-histories command. It works perfectly.

    git pull origin branchname --allow-unrelated-histories
    

提交回复
热议问题