使用 git remote add origin git@gitlab.test.com/fe-test.git 关联远程仓库,然后使用执行 git push -u origin master 报错:fatal: refusing to merge unrelated histories,Updates were rejected because the tip of your current branch is behind its remote counterpart。

git pull origin master ,报错:fatal: refusing to merge unrelated historiesgit push -u origin master,报错:Updates were rejected because the tip of your current branch is behind its remote counterpart在 git pull 的时候加上 --allow-unrelated-histories 参数,作用就是把两个不相干的分支进行强行合并。
欢迎访问:天问博客