Administrator@PC-20150110FGWU /K/cocos2d/yc (master)

$ git push -u origin master

To git@github.com:yangchao0718/cocos2d.git

 ! [rejected]        master -> master (non-fast-forward)

error: failed to push some refs to 'git@github.com:yangchao0718/cocos2d.git

hint: Updates were rejected because the tip of your current branch is behin

hint: its remote counterpart. Integrate the remote changes (e.g.

hint: 'git pull ...') before pushing again.

hint: See the 'Note about fast-forwards' in 'git push --help' for details.

出现错误的主要原因是github中的README.md文件不在本地代码目录中

可以通过如下命令进行代码合并【注:pull=fetch+merge]

git pull --rebase origin master

执行上面代码后可以看到本地代码库中多了README.md文件

此时再执行语句 git push -u origin master即可完成代码上传到github

解决failed to push some refs to git的更多相关文章

  1. 如何解决failed to push some refs to git

    $ git push -u origin master To git@github.com:yangchao0718/cocos2d.git ! [rejected]        master -& ...

  2. [转载]如何解决failed to push some refs to git

    Administrator@PC-20150110FGWU /K/cocos2d/yc (master) $ git push -u origin master To git@github.com:y ...

  3. GitHub上传项目时——解决failed to push some refs to git

    原文地址:https://jingyan.baidu.com/article/f3e34a12a25bc8f5ea65354a.html 遇到的问题: error: failed to push so ...

  4. 解决failed to push some refs to 'git@github.com:TQBX/GIT-Github-.git'问题

    解决以下问题问题: git pull origin master --allow-unrelated-histories 进入vim界面->ESC->:wq 重复第一步->git p ...

  5. 解决 failed to push some refs to 'git@github.com:zle1992/head-first-java' hint: Updates were rejected because the tip of your curr

    问题描述: 寒假之前用实验室电脑push到github 上head first java 的程序,寒假回家后,想用自己的笔记本继续编,继续push . 我先从github下载zip到本地,然后 解压后 ...

  6. 【转载】如何解决failed to push some refs to git

    在使用git 对源代码进行push到gitHub时可能会出错,信息如下   此时很多人会尝试下面的命令把当前分支代码上传到master分支上. $ git push -u origin master ...

  7. failed to push some refs to 'git@github.com:xxx/xxx.git' 解决方法

    此时很多人会尝试下面的命令把当前分支代码上传到master分支上. $ git push -u origin master 但依然没能解决问题 会出现: failed to push some ref ...

  8. failed to push some refs to 'git@github.com:cq1415583094/MyBatis.git'解决办法

    将本地git仓库代码提交到GitHub上时,出现failed to push some refs to 'git@github.com:cq1415583094/MyBatis.git', 导致的原因 ...

  9. git中failed to push some refs to git问题解决及基本使用

    国庆归来准备试用一下git,在提交代码时遇到时遇到一些问题 提交时使用git push origin master 出现failed to push some refs to git 回想一下,创建该 ...

随机推荐

  1. A Very Simple Problem

    A Very Simple Problem Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Other ...

  2. 使用Apache Commons Email 发生邮件

    Apache Commons Email的Maven依赖 <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-e ...

  3. CQRS微服务架构模式

    ​什么是微服务? 这是维基百科里面的定义:“微服务是面向服务架构(SOA)架构风格的一种变体,它将应用程序构建为一系列松散耦合的服务.在微服务体系结构中,服务应该是细粒度的,协议应该是轻量级的.将应用 ...

  4. json标准是双引号

    双引号才是json 的标准,单引号是不规范的(虽然在js 中是行的通的)!json 的名称和字符串值需要用双引号引起来,单引号的话,使用json.parse会出现错误

  5. css 选择器和优先级

    css样式是做网页时,页面 布局不可或缺的关键点.但是在做网页时,会遇到一些明明已经设置了样式的元素,缺无法达到想要的效果,这种情况比较常见.这就涉及到优先级的问题了 要说到css的优先级,先来看下c ...

  6. 线程中WICImage与Bitmap数据转换

    最近项目开发, 要用到线程中对图像进行缩放和二值化处理 为了省事, 图像缩放用的WICImage.ImagingFactory接口, 二值化用的是bitmap.PixelFormat := pf1bi ...

  7. 使用wwise音效引擎的好处

    用过一段时间的wwise,做以下几个具体功能的时候比较方便: 1.当策划需求一个声音需要随机播放多个随机音源的其中一个时,例如脚步声.普通攻击声,当这类声音一直播放的都是同一个音源的时候,人会产生听觉 ...

  8. C# 扩展方法使用

    为指定类型扩展方法: 定义类Class1: public static class Class1                                  //必须为static类,且不能包含 ...

  9. Java多线程学习之wait、notify/notifyAll 详解

    1.wait().notify/notifyAll() 方法是Object的本地final方法,无法被重写. 2.wait()使当前线程阻塞,前提是 必须先获得锁,一般配合synchronized 关 ...

  10. CocoaPods 安装及使用

    1.开启 terminal 2.移除现有 Ruby 默认源 $ gem sources --remove https://rubygems.org/ 3.使用新的源 $ gem sources -a ...