git push 出现The current branch login has no upstream branch.

223 阅读1分钟

问题原因

本地分支没有与远程仓库地址建立联系
下图所示

图片失效

解决办法

复制提示的代码填写就可以解决

  • 这个意思是把本地login push到origin的login
  • -u表示同时建立关联,以后再推送到远程只需git push origin
$ git push origin login -u