XuLaLa.Tech

首页客户端下载Windows 使用V2Ray 教程SSR 教程Clash 教程

Git refusing to merge unrelated histories

2025.04.09

在git操作之后添加“–allow-unrelated-histories ”,可以解决没有历史的相关的操作如,git pull,git merge,git rebase等。

Terminal

`$ git pull origin master
From https://github.com/mkyong/java-concurrency
* branch            master     -> FETCH_HEAD

fatal: refusing to merge unrelated histories
Copy
To fix it :

Terminal

$ git pull origin master --allow-unrelated-histories
From https://github.com/mkyong/java-concurrency
* branch            master     -> FETCH_HEAD
Merge made by the 'recursive' strategy.
LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 674 insertions(+)

create mode 100644 LICENSE

© 2010-2022 XuLaLa 保留所有权利 本站由 WordPress 强力驱动
请求次数:69 次,加载用时:0.665 秒,内存占用:32.19 MB