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