Git refusing to merge unrelated histories on rebase

后端 未结 23 2643
旧巷少年郎
旧巷少年郎 2020-11-22 08:30

During git rebase origin/development the following error message is shown from Git:

fatal: refusing to merge unrelated histories
Error redoing m         


        
23条回答
  •  温柔的废话
    2020-11-22 08:40

    Firstly pull the remote changes to your local using the following command:

    git pull origin branchname --allow-unrelated-histories
    

    ** branchname is master in my case.

    When the pull command done, conflict occurs. You should solve the conflicts. I use Android Studio to solve conflicts.

    When conflicts solved, merge is done!

    Now you can safely push.

提交回复
热议问题