解决"error: failed to push some refs to ‘git@gitee.com:username/repo.git’"

原因:
本地和远程库版本不一致
本人的场景是:建立远程库时添加了一个LICENSE文件,没有代码文件;本地有代码文件,但是没有LICENSE文件

尝试:

git fetch origin master
git merge origin/master
git add .
git commit -m "提交信息"
git push origin HEAD:master

参考:
https://stackoverflow.com/questions/21264738/error-src-refspec-master-does-not-match-any

解决“error: failed to push some refs to ‘git@gitee.com:username/repo.git‘“相关推荐

  1. Git Bash中出现:error: failed to push some refs to ‘https://gitee.com/xxx/xxx.git‘错误的解决方法

    Git Bash中出现:error: failed to push some refs to 'https://gitee.com/xxx/xxx.git'错误的解决方法 今天上传本地文件,在输入:$ ...

  2. 【GIT】error: failed to push some refs to 'https://github.com/username/python.git'

    error: failed to push some refs to 'https://github.com/username/python.git' 解决error: failed to push ...

  3. 解决error: failed to push some refs to 'https://github.com/Dongyaxin-ai/learngit.git'

    问题 在git bash 中键入git push -u origin master 进行提交的时候出现 如下错误 error: failed to push some refs to 'https:/ ...

  4. error: failed to push some refs to ‘https://gitee.com/wangdxstudy/mygirl.git‘解决办法

    出现该错误主要原因是因为上传的项目中没有".md"这个文件 解决办法: 1.下拉.md文件 git pull --rebase origin master 2.重新上传 git p ...

  5. 解决 error: failed to push some refs to ‘https://github.com/mxp520/test-spring-cloud-base.git‘

    在使用git对源代码进行push的到github时,可能会出现错误,如下图所示 出现错误的主要原因是github中的README.md文件不在本地代码目录中 可以通过如下命令进行代码合并[注:pull ...

  6. git报错error: failed to push some refs to ‘https://gitee.com/XXX/XXX-mater.git‘

    报错地方和修改: 解决方法: 1.输入命令: git pull --rebase origin master 先取消commit记录,之后同步远程库到本地,然后再将本地最新的重新push提交就行了. ...

  7. 使用git push推送时出现错误error: failed to push some refs to ‘https://gitee.com/yang-yimu/vue_shop.git‘

    解决方案:可能是因为在git线上仓库中,手动删除了某个文件导致线上线下不同步,这种情况下需要先git pull --rebase origin master 拉取线上仓库,在使用git add ,gi ...

  8. error: src refspec master does not match any error: failed to push some refs to ‘https://gitee.com/s

    发现是默认建立的仓库是 main,而不是 master iot421@iot421deMac StarpPhone % git push origin master error: src refspe ...

  9. git 提交时报错 error: failed to push some refs to ‘https://github.com/xxx/demo.git 解决方法

    1. 前言 本文解决由于git 处于游离状态下不能提交代码的问题.文章由导致原因,解决方法和思考三个内容组成. 2. 问题复现 我们从远程仓库 clone 代码下来,进行需求开发,可能进行了以下步骤. ...

  10. Git提交数据失败 error: failed to push some refs to 'https://github.com/XXXXXXX/gif.git'

    附载码云的使用教程地址:http://www.jianshu.com/p/084e0aabbab3 问题一:执行Git remote add origin https://github.com/XXX ...

最新文章

  1. android 禁用组件,android
  2. 函数调用规范__cdecl和__stdcall的区别
  3. 容器(Collection/Map)、容器中的设计模式
  4. python大数_python处理大数字的方法
  5. python模拟手机充值场景_appium+Python实例(二)模拟新建场景表(辅助测试执行)...
  6. 空冷器投用步骤_石油二厂制氢装置为空冷器“洗澡”【奋进之路】
  7. ubuntu 16.04 安装 google浏览器
  8. hashmap put过程_HashMap为什么线程不安全?
  9. MasterPage简介
  10. 使用python调用shell判断当前进程是否存在
  11. 金融行业灾备压力大?看中和农信如何从容应对
  12. GoC全教程(附各种下载、教程链接)
  13. robocode基本原理之坐标锁定
  14. 流传千古的爱情传说原来竟是一个先劫色后劫财的骗局
  15. android—AOSP、AOKP、CM的区别
  16. Error response from daemon: conflict: unable to delete a9ac6b268134 (must be forced) - image is bein
  17. Flume-三大核心组件
  18. 怎么做餐饮行业的引流?
  19. 基于C/C++的UTF-8转GBK,补充中文符号的乱码
  20. DAP-LINK调试器资料收集

热门文章

  1. 大白话:分布式与集群是什么 ?( 半分钟就懂)
  2. 青岛大学计算机分专业吗,青岛大学热门专业有哪些?附青岛大学最低分专业名单...
  3. Linux C 函数参考(日期时间) 作者: 出处:hur.cn 更新时间: 2007年01月29日
  4. BugkuCTF_Web——“秋名山老司机”、“速度要快”、“cookies欺骗”
  5. esp32 采集某个路由器信号强度
  6. SSD接口类型小知识
  7. android 生物识别_将生物识别提示与cryptoobject一起使用
  8. D3D9 简单图形的绘制以及显示
  9. hyperledger fabric 2.3.3 搭建教程
  10. Angular CLI简介