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. Catfish CMS漏洞集合

    转自https://larryxi.github.io/ 0x00 背景 版本:V 4.2.35 官网下载:http://www.catfish-cms.com/page/4.html 文章内容仅作学 ...

  2. bzoj千题计划303:bzoj4827: [Hnoi2017]礼物

    https://www.lydsy.com/JudgeOnline/problem.php?id=4827 式子化简一下,发现最后只跟 Σ xi*yi 有关 第二个序列反转,就可以用FFT优化 注意: ...

  3. 转 -- 详解python的super()的作用和原理

    原文地址 Python中对象方法的定义很怪异,第一个参数一般都命名为self(相当于其它语言的this),用于传递对象本身,而在调用的时候则不必显式传递,系统会自动传递. 今天我们介绍的主角是supe ...

  4. vue中$mount与el区别

    vue中的$mount和el两者在使用中没有什么区别,都是将实例化后的vue挂载到指定的DOM元素中 用法: 如果在实例化vue时指定el,则该vue将会渲染在el对应的DOM中 反之 没有指定el, ...

  5. SpringMVC学习笔记_01

    1.JAVAEE体系结构 JAVAEE体系结构图如下所示: 2.什么是springmvc? 什么是mvc? Model1 Model2 SpringMVC是什么? SpringMVC是一个web层mv ...

  6. 使用PLC作为payload/shellcode分发系统

    这个周末,我一直在鼓捣Modbus,并利用汇编语言开发了一个stager,它可以从PLC的保持寄存器中下载payload.由于有大量的PLC都暴露在互联网上,我情不自禁地想到,是否可以利用它们提供的处 ...

  7. UBUNTU18.4环境下使用更好用的搜索引擎(无奈,只能起这样的标题)

    初步安装 更新软件源 sudo apt-get update 安装pip (一个安装和管理 Python 包的工具) sudo apt-get install python-pip sudo apt- ...

  8. luogu P2123 皇后游戏

    传送门 跟国王游戏一样的分析 考虑相邻的两个大臣,设他们前面的\(\sum a_j\)为\(s\),同时注意到后面人的贡献更大 所以\(i\)在前面时,\(c_j=\max(\max(c_{last} ...

  9. centos7之系统优化方案

    优化条目: 修改ip地址.网关.主机名.DNS等 关闭selinux,清空iptables 添加普通用户并进行sudo授权管理 更新yum源及必要软件安装 定时自动更新服务器时间 精简开机自启动服务 ...

  10. Mybatis进阶学习笔记——关系查询——一对多查询

    一个客户拥有多个订单 <resultMap type="User" id="UserOrderResultMap"> <id column=& ...