git push ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/Operater9/guest' hint: Updates were rejected because the tip of your current bra
推送本地代码到github报错
git push报错
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/Operater9/guest'
hint: Updates were rejected because the tip of your current branch is behind
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.
查了资料后发现是本地没有update到最新版本的项目(git上有README.md文件没下载下来)
本地直接push所以会出错。
执行下面的拉命令,还是不行
$ git pull origin master
From https://github.com/Operater9/guest
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
执行下面代码
参考https://stackoverflow.com/questions/24114676/git-error-failed-to-push-some-refs-to
git pull --rebase origin master
发现此时已经把github上最新的文件下载下来了:也就是README.md文件。
接着执行推送
git push -u origin master
成功推送本地代码到远程仓库
参考https://blog.csdn.net/u013120247/article/details/53263169
git push ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/Operater9/guest' hint: Updates were rejected because the tip of your current bra的更多相关文章
- git push 时发生错误 error: src refspec master does not match any. error: failed to push some refs to
很多相关解决办法都是最后要 push 到远端的 master 上,但很多其实要求不能把个人的修改内容直接 push 到 master 主分支. 因此,当我想将本地 feature/work1 分支的修 ...
- git 本地推送远程仓库报错: error: failed to push some refs to 'https://github.com/yangtuothink/mxonline.git'
报错现象 添加远程仓库后 推送代码的时候报错 报错分析 远程代码和本地代码不匹配问题 远程初始仓库的创建有些默认 的 README什么的本地是没有的 需要先同步后再上传 报错解决 git push - ...
- 解决 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到本地,然后 解压后 ...
- git 解决push报错:[rejected] master -> master (fetch first) error: failed to push some refs to
今天对代码进行了修改优化,然后往往远程push,但push后报错了 git操作 git add . git commit -m"fix" git push origin maste ...
- To ssh://xxx.com:8022/test/project.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'ssh://xxx.com:8022/test/project.git'
To ssh://xxx.com:8022/test/project.git ! [remote rejected] master -> master (pre-receive hook dec ...
- git push -u origin master error: failed to push some refs to
1.问题描述 $ git push -u origin master To github.com:[github_name]/[github_repository_name].git ! [rejec ...
- git push origin master出错:error: failed to push some refs to
1.输入git push origin master 出错:error: failed to push some refs to 那是因为本地没有update到最新版本的项目(git上有README. ...
- Git error: hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused b
hint: Updates were rejected because the remote contains work that you dohint: not have locally. This ...
- Git本地分支版本号过低导致的push错误 error: failed to push some refs to ... 及兴许amend
今天在用git的时候遇到了一个问题.在想远程分支push的时候,出现了以下的错误: ! [remote rejected] master -> refs/for/master (change 1 ...
随机推荐
- Ansible-目录
Ansible-概念 Ansible-安装 YAML语法
- linux内核--wait_event_interruptible_timeout()函数分析(转)
原文:https://blog.csdn.net/wuyongpeng0912/article/details/45723657 网上有关于此函数的分析,但大都是同一篇文章转载来转载去,没有进一步的分 ...
- Linux运维技术之端口转发
- 5.Lvs+Keepalived健康检查
1. Nginx+keepalived对后端服务器心跳检查(需要自定义脚本) 原理:Keepalived并不跟nginx耦合,它俩完全不是一家人但是keepalived提供一个机制:让用户自定义一个s ...
- Pytorch之Dataparallel源码解析
之前对Pytorch 1.0 的Dataparallel的使用方法一直似懂非懂,总是会碰到各种莫名其妙的问题,今天就好好从源头梳理一下,更好地理解它的原理或者说说下步骤. 源码地址: https:// ...
- @Transactional(rollbackFor)
@Transactional注解有两个,一个是spring提供的@org.springframework.transaction.annotation.Transactional 另一个是jdk提供@ ...
- 51Nod1686 第K大区间 和 NOI2016 区间
谈一下尺取法的经典题. 第K大区间 定义一个区间的值为其众数出现的次数. 现给出n个数,求将所有区间的值排序后,第K大的值为多少. 众数:区间里出现次数最多的数字,例如:1 1 2 2 2,区间[1 ...
- autoRoll_UpDown()|上下滚动函数|无缝|自动(自带demo)
autoRoll_UpDown函数 function autoRoll_UpDown($domObj,speed){ //$domObj 外围容器的jQuery式元素对象 speed 滚动速度,单位毫 ...
- JS实现继承的几种方法
父类: // 定义一个动物的类 function Animal (name) { // 属性 this.name = name || 'Animal'; // 实例方法 this.sleep = fu ...
- Xamarin.Forms之样式
使用XAML样式设置Xamarin.Forms应用的样式Xamarin.Forms应用程序的样式传统上是通过使用Style类将一组属性值分组到一个对象中来完成的,然后可以将其应用于多个视觉元素实例. ...