1.输入git push origin master

出错:error: failed to push some refs to

那是因为本地没有update到最新版本的项目(git上有README.md文件没下载下来)

本地直接push所以会出错。

2.所以本地要输入git pull

然后出现的英语提示'git pull <repository> <refspec>'显示要选择远程分支

2.就试试指定目标到远程分支

输入git pull origin

出现提示

but did not specify
a branch. Because this is not the default configured remote
for your current branch

3.,重置pull origin!

输入git pull --rebase origin master

成功update到最新文件

4.输入git push origin master

整个项目就上传到coding云了

5.还是得多学英语才能再stackoverflow混

参考资料

git error: failed to push some refs to

See git-pull(1) for details

git pull <remote> <branch>

比如git pull origin master

从远端origin拉取master分支的内容然后合并到当前所处的本地分支。直接git pull的话默认远程库是orgin,默认远程库的分支是master。

If you wish to set tracking information for this branch you can do so with:

指定远程分支

git branch --set-upstream-to=origin/<branch> master

比如我们设置远程库origin的master分支

git branch --set-upstream-to=origin/master

git push origin master出错:error: failed to push some refs to的更多相关文章

  1. 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 ...

  2. Push rejected: Push master to origin/master was rejected /failed to push some refs to /git did not exit cleanly

    用studio提交代码报 Push rejected: Push master to origin/master was rejected 用TortiuseGit提交代码报下面错,(我是用这种方法解 ...

  3. git push后出现错误 ![rejected] master -> master(non-fast-forward) error:failed to push some refs to 'XXX'

    本地创建了一个project并在GitHub上创建了一个仓库,想要将本地的仓库链接到远程仓库我用的是如下方法:git init    //初始化本地仓库git remote add origin XX ...

  4. git push报错! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://gitee.com/XXX.git

    git pull origin master --allow-unrelated-histories  //把远程仓库和本地同步,消除差异 git add . git commit -m"X ...

  5. 【错误】上传新的项目出错 error: failed to push some refs to 'https://github.com/...

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

  6. rake deploy ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to解决方法

    需要修改项目中Rakefile文件的内容: 原始内容:system "git push origin #{deploy_branch}" 改后内容:system "git ...

  7. 用git bash 传数据到远程出错:git push origin master 出错:error: failed to push some refs to

    https://blog.csdn.net/qq_28055429/article/details/51007453

  8. 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 ...

  9. git push origin master 上传失败

    http://blog.csdn.net/llf369477769/article/details/51917557 按照网上教程用git把项目上传到github,但是在最后一步git push or ...

随机推荐

  1. shell中的循环语法

    shell中的循环语法              作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.for循环 1.语法格式1 for 变量 in 值1 值2 值3 ... do ...

  2. 面向对象【day07】:类的继承(七)

    本节内容 1.概述 2.类的继承 3.总结 4.练习 一.概述 之前我们说到了类的公有属性和类的私有属性,其实就是类的封装,下面我们来讲讲继承,是面向对象的第二大特性. 面向对象编程 (OOP) 语言 ...

  3. Swift学习笔记8--Optional Chaining

    Optional Chaining 自判断链接(Optional Chaining)是一种可以请求和调用属性.方法及子脚本的过程,它的自判断性体现于请求或调用的目标当前可能为空(  nil ).如果自 ...

  4. 使用MedleyText与Syncthink自建云笔记

    随着学习加深,做的笔记越来越多,而使用云笔记怕万一平台关闭(如360网盘啥的)还需要导出笔记费时费力,并且多平台兼容性未知.还是自己搭建放心省事. MedleyText介绍 MedleyText为ma ...

  5. Linux_安装

    总结:    分区-->格式化-->起一个设备文件名(逻辑分区一定从5开始)-->指定挂载点(必须是空的目录名称作为盘幅)

  6. scapy官方文档

    https://thepacketgeek.com/scapy-p-04-looking-at-packets/ http://biot.com/capstats/bpf.html   filter语 ...

  7. 图片和流的相互转化 (c/s)

    //图片转化为流保存: Stream ms; byte[] picbyte; OpenFileDialog open = new OpenFileDialog(); open.Filter = &qu ...

  8. JavaScript之复杂对象的深拷贝(完全深拷贝)

    由于网上很多的深拷贝大都有如下问题: 1.灵活性.不能应对复杂对象(复杂对象是指:单一数组对象.多数组对象.多非数组对象.单一对象组合形成的复杂对象)的灵活拷贝 2.不变性.即 拷贝的对象与原对象的结 ...

  9. Python中os.system和os.popen区别

    Python调用Shell,有两种方法:os.system(cmd)或os.popen(cmd)脚本执行过程中的输出内容.实际使用时视需求情况而选择. 两者的区别是: os.system(cmd)的返 ...

  10. Python2和Python3中print的不同点

    在Python2和Python3中都提供print()方法来打印信息,但两个版本间的print稍微有差异 主要体现在以下几个方面: 1.python3中print是一个内置函数,有多个参数,而pyth ...