vscode中 新建项目git push报错

连接好远程仓库之后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

成功!

 

posted @ 2023-05-24 15:22  妞妞猪  阅读(167)  评论(0)    收藏  举报