合并错误: refusing to merge unrelated histories
时间: 2023-10-17 15:27:44 浏览: 178
"refusing to merge unrelated histories"是一个git合并错误的提示。它表示两个分支具有不相关的提交历史,因此拒绝进行合并操作。要解决这个问题,可以在执行merge命令时添加--allow-unrelated-histories参数来允许合并不相关的历史。这样就可以成功合并这两个分支了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [git merge(git pull)合并时遇上refusing to merge unrelated histories的解决方案](https://blog.csdn.net/rt5476238/article/details/127421733)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [git merge 合并分支时遇上refusing to merge unrelated histories的解决方案](https://blog.csdn.net/quhan97/article/details/122726787)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [详解git无法pull仓库refusing to merge unrelated histories](https://download.csdn.net/download/weixin_38736721/12843821)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文