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 ...
随机推荐
- Beta冲刺第2次
二.Scrum部分 1. 各成员情况 翟仕佶 学号:201731103226 今日进展 优化了文件IO 存在问题 无 明日安排 同小小组另两人协商功能改进 截图 曾中杰 学号:201731062517 ...
- C++学习(7)—— 函数提高
1. 函数默认参数 在C++中,函数的形参列表中的形参是可以有默认值的 语法:返回值类型 函数名 (参数=默认值){} 注意 如果某个位置已经有了默认参数,那么从这个位置往后,从左到右都必须有默认值 ...
- git使用过程中的若干问题笔记
1.关于本地分支创建之后,如何在远程创建同名分支并完成本地分支到远程分支的push 首先创建本地库分支以dev为例 然后输入命令git push --set-upstream origin dev / ...
- utf8mb4版本设置django
'OPTIONS':{ 'init_command':"SET sql_mode='STRICT_TRANS_TABLES'", 'charset':'utf8mb4',
- 项目Beta冲刺(团队)——博客集合
项目Beta冲刺(团队)--博客集合 格式描述 课程名称:软件工程1916|W(福州大学) 作业要求:项目Beta冲刺(团队) 团队名称:为了交项目干杯 作业目标:集中记录所有Beta敏捷冲刺日志的集 ...
- Easyui 验证验证扩展,限制combobox 只能输入选项内容
$.extend($.fn.validatebox.defaults.rules, { CHS: { validator: function (value, param) { return /^[\u ...
- wordpress角色权限汇总
我们在用wordpress开发的时候有时候需要设置不同的用户组及权限,具体有哪些角色权限呢?随ytkah一起来看看吧.WordPress使用了角色的概念,旨在让站点所有者能够控制用户在站点中可以做什么 ...
- 《DSL》笔记一、什么是DSL(转)
1.1.问题域与解答域 1.1.1.什么是DSL? DSL(Domain-Specific Language)全称领域专用语言,就是专门用户特定领域的语言,看着概念觉得挺高大上的,其实很简单,就是专门 ...
- Async/await promise实现
An async function can contain an await expression that pauses the execution of the async function an ...
- Dubbo架构及原理
1.Dubbo:Dubbo是一个分布式服务框架,SOA治理方案. 主要功能有:高性能的NIO通讯以及协议集成.服务动态寻址与路由.软负载均衡与容错.依赖分析与降级 主要特点: 连通性:provider ...