FETCH_HEAD = [up to date] master -> origin/master refusing to merge unrelated histories
时间: 2023-08-22 19:12:36 浏览: 233
react-native-game-master.zip_The Master_react native_react-nativ
回答: 当你在进行版本控制时,如果出现"FETCH_HEAD = \[up to date\] master -> origin/master refusing to merge unrelated histories"的错误提示,这意味着你正在尝试合并两个不相关的历史记录。这通常发生在两个不同的仓库或分支之间进行合并时。为了解决这个问题,你可以尝试使用`--allow-unrelated-histories`选项来允许合并不相关的历史记录。例如,你可以运行以下命令来拉取远程仓库的最新更改并建立关联:
```
git pull --allow-unrelated-histories origin master
```
这将允许你合并不相关的历史记录并建立关联。请注意,在合并不相关的历史记录时,你可能需要手动解决冲突。
#### 引用[.reference_title]
- *1* [git出现:[up to date] master -> origin/masterrefusing to merge unrelated histories](https://blog.csdn.net/llupengt/article/details/124273668)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Git报错 FETCH_HEAD fatal: refusing to merge unrelated histories](https://blog.csdn.net/mysnsds/article/details/126612342)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文