git 发生:

fatal: The current branch develop has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin develop

具体fatal错误如图:

上传至gitlab—— 本地git出现fatal: The current branch develop has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin develop 的问题

这个错误就是 表示本地分支与远程分支之间没有连接起来。

解决方法:只需要在输入 git push -u origin develop(这个develop是远程分支名), 因为本身我就在本地的develop分支上面,所以可以直接 push,如下图,成功。如果本地不在develop分支上,可以先git checkout develop切换分支至本地develop分支再执行刚才那条推送命令推至远程develop分支。

上传至gitlab—— 本地git出现fatal: The current branch develop has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin develop 的问题

参考:https://blog.csdn.net/weixin_44514665/article/details/91956785

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2022-02-07
  • 2021-05-12
猜你喜欢
  • 2022-12-23
  • 2021-07-18
  • 2022-02-23
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案