fatal: The current branch master has no upstream branch.

编程入门 行业动态 更新时间:2024-10-25 08:15:12

fatal: The <a href=https://www.elefans.com/category/jswz/34/1739388.html style=current branch master has no upstream branch."/>

fatal: The current branch master has no upstream branch.

问题:git push时,出现fatal: The current branch master has no upstream branch.

PS D:\2022\03\forum> git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, usegit push --set-upstream origin master

原因:本地的分支与远程仓库的分支进行关联

解决方法:

git push -u origin master

推送成功:

PS D:\2022\03\forum> git push -u origin master
Enumerating objects: 25, done.
Counting objects: 100% (25/25), done.
Delta compression using up to 8 threads
Compressing objects: 100% (15/15), done.
Writing objects: 100% (25/25), 58.88 KiB | 4.21 MiB/s, done.
Total 25 (delta 0), reused 0 (delta 0), pack-reused 0
To /**/**.git* [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.

可提供远程搭建运行服务

不会调试运行的同学,你只需打开远程,会帮你搭建调试好一切(JDK、Idea/Eclipse、MySQL、Tomcat、Maven………)

点击获取项目源码

更多推荐

fatal: The current branch master has no upstream branch.

本文发布于:2024-02-27 06:17:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1705496.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:current   fatal   branch   upstream   master

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!