fatal: The current branch dev_zgd has no upstream branch.
E:\09-code\06-Turbulent_flow_spectrum>git push
fatal: The current branch dev_zgd has no upstream branch.
To push the current branch and set the remote as upstream, usegit push --set-upstream origin dev_zgdE:\09-code\06-Turbulent_flow_spectrum>
报错如下:
fatal: The current branch dev_zgd has no upstream branch.
翻译以下
致命:当前分支 dev_zgd 没有上游分支。
原因:
首先git push命令,是默认将当前分支Push到远程的对应的分支,如果远程不存在对应分支,则会报错。比如这里,本地是dev分支,远程没有dev分支,使用这条命令默认就是对应远程dev分支,所以就会报错。
解决方法
方法1
- 根据提示的命令git push --set-upstream origin dev,这条命令是将远程也重新创建一个分支dev,这样就匹配了,然后再push
- 执行完毕后,远程就会多出一个dev分支,并且我的代码也更新在了上面
方法2
指定分支push
2020-11-27 git push到指定分支
fatal: The current branch dev_zgd has no upstream branch.相关推荐
- fatal: The current branch dev has no upstream branch. To push the current branch and set the remote
fatal: The current branch dev has no upstream branch. To push the current branch and set the remote ...
- 报错 fatal: The current branch html has no upstream branch. To push the current branch and set the
场景: 远程上有已存在的项目的后端代码,想要把这个项目的前端代码推送上去. 做的步骤: 1.git status 2. git add . 注意add和.之间有空格 3.git commit - m ...
- Git报错:fatal: The current branch main has no upstream branch
Git报错:fatal: The current branch main has no upstream branch 参考:https://blog.csdn.net/benben_2015/art ...
- fatal: The current branch xiao has no upstream branch. To push the current branch and set the remote
场景: 使用git 的时候,git push 然后提示我以下错误 $ git pushfatal: The current branch xiao has no upstream branch.To ...
- 【git报错】The current branch dev has no upstream branch. To push the current branch and set the remote
发现问题 本地新建了一个dev分支,然后把dev分支下的代码push到远程仓库中,使用git push,但是报错了,如下: fatal: The current branch dev has no u ...
- git 本地新建分支上传报错The current branch dev has no upstream branch.To push the current branch and setremote
项目本地初始化后,commit执行完毕,然后执行git push,报如下错误: $ git push fatal: The current branch dev has no upstream bra ...
- git push 出现 The current branch dev has no upstream branch.的问题
git push 出现 The current branch dev has no upstream branch.的问题 原因:本地分支没有和远程分支关联,导致无法push 解决方法:git pus ...
- Git使用中报错fatal: The current branch master has no upstream branch.解决方案
在push代码时,出现"git master branch has no upstream branch"问题的原因是没有将本地的分支与远程仓库的分支进行关联.如下图所示: 具体原 ...
- git push错误(fatal: The upstream branch of your current branch does not match)解决方案
有时候通过git push命令时会提示不成功,错误提示如下: localhost:lean-server alioo$ git push fatal: The upstream branch of y ...
最新文章
- 关于版本控制工具GitHub安装报错
- java calendar.add方法_Java Calendar add()方法与示例
- Boost:宏BOOST_NO_EXCEPTIONS的使用实例
- [EDA]FPGA/CPLD 设计流程步骤及步骤概念
- SQLCE 3.5 部署打包
- iOS7应用开发4、Foundation框架
- 小程序中字符串转数组如何实现
- javascript创建面包屑路径
- java可视化编程软件有哪些_几款Java开发者必备常用的工具,准点下班不在话下...
- JavaCV最小依赖
- zemax操作例子_ZEMAX软件使用入门
- 第十章 第二节二重积分的计算(同济版)
- 2018ACM-ICPC 焦作站现场赛 F. Honeycomb(BFS求最短路,卡memset)
- 独家揭秘!2.5亿用户的美团智能推荐平台是如何构建的?
- 解决“ 故障模块名称: clr.dll ”
- HBuilder软件下载及安装教程
- bootstrap地址选择(全国省市选择、定位)功能
- 基于AI挑战《星际争霸II(StarCraft II)》的Windows版本下载安装详细教程
- vlc 视频局部放大【WPF版】
- 赛门铁克公司的极限之旅
热门文章
- 自动驾驶一周资讯汇总 2022/4/23
- IOS越狱环境用触摸触动LUA获取当前账号sec_uid
- Python自动化办公学习- 获取文件夹下的所有文档的名字并存储到Excel
- 开关电源如何布置-唯样商城
- python的pillow给图片加文字_详解PILLOW图片中加入中文的实例
- 剪花布条(字符串,C++)
- 贪心埃及分数函数c语言,贪心算法之埃及分数问题
- 力扣每日一题 到达终点数字
- 阿里分布式事务框架Seata,AT模式原理解析
- 一篇文章帮你搞懂什么是“最小可行性产品”(MVP),以及如何实现!