新建项目git push报错

发布时间 2023-05-24 15:28:03作者: 妞妞猪

连接好远程仓库之后push,发现报错

git要求我们在第一次push之前先进行pull操作

而执行pull之后,又报错:

git提示:There is no tracking information for the current branch.

解决方法在终端输入:

git branch --set-upstream-to=GYKG-invoice/master master

pull还报错:

fatal: refusing to merge unrelated histories

解决方法终端输入:

git pull GYKG-invoice master --allow-unrelated-histories

成功!