寫了一天代碼,提交時報錯。拉取也不行
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