git push报错error: failed to push some refs to 'git@github.com'



$ git push -u origin master
To git@github.com:xxx/xxx.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:xxx/xxx.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

原因: GitHub远程仓库中的README.md文件不在本地仓库中。 

  解决方案:

$ git pull --rebase origin master
$ git push -u origin master

git push报错error: failed to push some refs to 'git@github.com'的更多相关文章

  1. 由于github仓库中提前建立readme文件,导致git push报错error: failed to push some refs to 'git@github.com:

    $ git push -u origin master To git@github.com:xxx/xxx.git ! [rejected] master -> master (fetch fi ...

  2. 解决git push报错error: failed to push some refs to 的问题

    这个问题发生的背景一般是: 想把自己本地的某个项目关联到远程仓库并推送上去,接着他会做如下操作: 本地项目->远程创建仓库->本地关联远程->推送最新代码 最后一个步骤发生问题: 那 ...

  3. Git push 报错error: failed to push some refs to 'git@github.com'

    出错原因 当我们在github版本库中发现一个问题后,你在github上对它进行了在线的修改:或者你直接在github上的某个库中添加readme文件或者其他什么文件,但是没有对本地库进行同步.这个时 ...

  4. 提交代码报错 error: failed to push some refs to

    在本人想把本地的分支推送到远程仓库时,突然出现了错误提醒error: failed to push some refs to....心里一咯噔,推不上去这还得了,手比脑快地就去google了一下. 然 ...

  5. git 本地推送远程仓库报错: error: failed to push some refs to 'https://github.com/yangtuothink/mxonline.git'

    报错现象 添加远程仓库后 推送代码的时候报错 报错分析 远程代码和本地代码不匹配问题 远程初始仓库的创建有些默认 的 README什么的本地是没有的 需要先同步后再上传 报错解决 git push - ...

  6. git 报错 error: failed to push some refs to .....

    git push 代码的时候报错,报错如下: 这种报错是因为远程仓库的代码和本地仓库的代码不同步,对本地的代码进行一次拉取,再 git push 就可以解决了 通过如下命令进行代码合并 git pul ...

  7. 解决 React-Native mac 运行报错 error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by ope

    React-Native 开发的项目,Android 方面没有任何问题,IOS 就是无法跑起来,报错信息如下: mac 10.14.4 xcode 10.2.1 error Failed to bui ...

  8. Android Studio报错Error:Failed to open zip file. Gradle's dependency cache may be corrupt

    Android Studio导入项目后,Gradle编译失败,报错如下. Error:Failed to open zip file. Gradle's dependency cache may be ...

  9. Jenkins新建项目中源码管理Repository URL使用Git报错:Failed to connect to repository : Command "git ls-remote -h......

    之前部署了Gitlab+Gerrit+Jenkins持续集成环境,但在Jenkins中新建项目的源码管理"Repository URL"中添加git地址环节出现了问题,信息为&qu ...

随机推荐

  1. defer 的常用场景

    将panic的转化为error类型值,并将其作为函数值返回给调用方 package main import "fmt" func divide(a, b int) (res int ...

  2. python垃圾回收

    python垃圾回收 python垃圾回收主要使用引用计数来跟踪和回收垃圾.在引用计数的基础上,通过“标记—清除”解决容器对象可能产生的循环引用问题,通过“分代回收”以空间换时间的方法提高垃圾回收效率 ...

  3. spring cloud sleuth

    新建spring boot工程trace-1,添加pom依赖 <dependency> <groupId>org.springframework.cloud</group ...

  4. 使用.NET Core与Google Optimization Tools实现员工排班计划Scheduling

    上一篇说完<Google Optimization Tools介绍>,让大家初步了解了Google Optimization Tools是一款约束求解(CP)的高效套件.那么我们用.NET ...

  5. 【Java初探实例篇01】——Java语言基础

    示例系列,将对每节知识辅以实际代码示例,通过代码实际编写,来深入学习和巩固学习的知识点. IDE:intellij IDEA: 语言:Java 本次示例:Java语言基础知识的应用. 创建包day_4 ...

  6. Spring Security 与 OAuth2 介绍

    个人 OAuth2 全部文章 Spring Security 与 OAuth2(介绍):https://www.jianshu.com/p/68f22f9a00ee Spring Security 与 ...

  7. PTA (Advanced Level) 1006 Sign In and Sign Out

    Sign In and Sign Out At the beginning of every day, the first person who signs in the computer room ...

  8. UEFI+GPT与BIOS+MBR各自有什么优缺点?

    1.分区数量上,gpt好像可以支持无限个分区,不过window上只认128个,而且gpt分区不分主分区,逻辑分区,可以理解为全部都是主分区,就相当于可以允许你一个分区一个系统,128个系统了.而这是m ...

  9. Curling 2.0(DFS简单题)

    题目链接: https://vjudge.net/problem/POJ-3009 题目描述: On Planet MM-21, after their Olympic games this year ...

  10. 使用Ajax的Time实现倒计时功能

    网上有网友想实现一个功能,就是倒计时的功能.以某时间点与当前时间比较,还剩余时间,进行实时显示.这个问题,让Insus.NET想起以前有做过一个实时时钟有点相似.http://zzk.cnblogs. ...