IDEA新建项目提交到git仓库时报错:Can't Update No tracked branch configured for branch master or the branch...


写了一天代码,提交时报错。拉取也不行

Can't Update
No tracked branch configured for branch master or the branch doesn't exist.
To make your branch track a remote branch call, for example,
git branch --set-upstream-to=origin/master master (show balloon)

  

原因:

  Git 不知道你要pull远程的哪个分支. 如果此时使用命令行,输入 git pull 可以查看详细的错误提示为: There is no tracking information for the current branch.  

解决方法:

  提交代码到新仓库时报错,解决方法:

  Alt + F12 呼出Terminal,输入以下指令:

git branch --set-upstream-to=origin/master

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM