origin/main refusing to merge unrelated historie
时间: 2023-10-12 22:01:29 浏览: 77
回答: 当出现"origin/main refusing to merge unrelated histories"错误时,这通常是因为你正在尝试将两个不相关的代码库合并在一起。这可能发生在远程push或git merge过程中。解决这个问题的方法是在合并命令后面加上"--allow-unrelated-histories"参数,这样就允许合并不相关的历史。通过使用这个参数,你可以成功地合并这两个代码库的历史。 <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [refusing to merge unrelated histories的解决方案(本地/远程)综合](https://blog.csdn.net/junruitian/article/details/88361895)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [IDEA git origin/master refusing to merge unrelated histories](https://blog.csdn.net/AmdyTeng/article/details/121348621)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文