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

前端 未结 8 478
傲寒
傲寒 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:25

    Try --allow-unrelated-histories

    Like max630 commented, or as explained here Git refusing to merge unrelated histories

    0 讨论(0)
  • 2020-12-04 06:25

    Execute the following command:

    git pull origin master --allow-unrelated-histories
    

    A merge vim will open. Add some merging message and:

    1. Press ESC
    2. Press Shift + ';'
    3. Press 'w' and then press 'q'.

    And you are good to go.

    0 讨论(0)
提交回复
热议问题