Git Pull Failed refusing to merge unrelated histories解决

it2025-08-04  6

重新拉取代码的时候出现的问题。

百度出现的解决办法

总共试了三次,配置了git的环境变量;

设置了git的邮箱以及用户名,(不知道这个有没有起作用,反正一顿操作下来就好了)

git config --global user.name "Your Name" git config --global user.email "email@example.com"

再进行命令,

git pull origin '分支名称' --allow-unrelated-histories

即可成功。记录下问题

最新回复(0)