错误

error: failed to push some refs to 'https://github.com/whitclass/scrapy-spider.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

解决:

1、在使用git 对源代码进行push到gitHub时可能会出错

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

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

git pull --rebase origin master

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

5、此时再执行语句 git push 即可完成代码上传到github

参考https://blog.csdn.net/orchidofocean/article/details/76599656

github 如何解决error: failed to push some refs的更多相关文章

  1. git 解决 error: failed to push some refs to 'https://github.com/xxxx.git'

    在github远程创建仓库后, 利用gitbash进行提交本地文件的时候出现如下错误 [root@foundation38 demo]# git push -u origin master Usern ...

  2. 如何解决error: failed to push some refs

    $ git push -u origin master To github.com:a653398363/testtest.git ! [rejected] master -> master ( ...

  3. error: failed to push some refs to 'https://github.com/username/python.git'

    解决error: failed to push some refs to 'https://github.com/bluepen/python.git' 当我们在使用git工具上传我们自己的代码时,可 ...

  4. 错误:error: failed to push some refs to 'https://github.com/pzq7025/KG.git'的解决办法

    一.问题在进行[git push orgin master]的时候出现如下错误 ! [rejected] master -> master (non-fast-forward) error: f ...

  5. git 报错:error: failed to push some refs to 'https://github.com/Anderson-An/******.git'(已解决)

    提交push 报错: $ git push origin masterTo https://github.com/Anderson-An/******.git ! [rejected] master ...

  6. git rebase与 git合并(error: failed to push some refs to)解决方法

    1.遇到的问题 本地有一个git仓库,在github上新建了一个空的仓库,但是更新了REWADME.md的信息,即在github上多了一个提交. 关联远程仓库,操作顺序如下: git remote a ...

  7. 如何解决git====push 过程中出现的。error: failed to push some refs

    当我们在利用git  push 文件到仓库时出现了一下问题: ! [rejected] master -> master (fetch first)error: failed to push s ...

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

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

  9. 由于github仓库中提前建立readme文件,导致git push报错error: failed to push some refs to 'git@github.com:

    $ git push -u origin master To git@github.com:xxx/xxx.git ! [rejected] master -> master (fetch fi ...

随机推荐

  1. windows软件介绍

    基础软件 txt 阅读 NotePad++,方便阅读代码,支持列复制. 全局搜索 Everything 截图 Snipaste 读取图片 Picase.PureRef 其他 置顶窗口 DeskPins ...

  2. Linux通过命令行将英文改成中文

    1.首先查看当前系统是否有中文语言包 locale -a 如果没有zh_CN.utf8,就需要下载中文语言包,否则,如果有中文语言包,跳过第二步. 2.安装中文语言包 Ubuntu: sudo apt ...

  3. Georgia and Bob(POJ 1704)

    原题如下: Georgia and Bob Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12712   Accepted: ...

  4. 漏洞扫描工具acunetix12会遇到的问题

    1.如果安装好之后,打开工具时显示无法访问,首先去看任务管理器当中,acunetix的服务是否启动了 2.如果忘记了账号密码,可以在安装目录下,双击ChangePassword.exe进行重置密码

  5. k8s运行容器之deployment(三)

    deployment 我们已经知道k8s是通过各种controller来管理pod的生命周期.为了满足不同业务场景,k8s开发了Deployment.ReplicaSet.DaemonSet.Stat ...

  6. 学习使用PSTools工具中的psping

    目录 初识PsTools psping 1.使用ICMP ping 2.使用TCP ping 3.延迟测试 4.带宽测试 5.同功能的tcping工具 总结 初识PsTools     在工作中我们都 ...

  7. CRM、用户管理权限

    CRM目录结构 from django.shortcuts import HttpResponse,render,redirect from django.conf.urls import url f ...

  8. 企业项目实战 .Net Core + Vue/Angular 分库分表日志系统一 | 前言

    教程预览 01 | 前言 02 | 简单的分库分表设计 03 | 控制反转搭配简单业务 04 | 强化设计方案 05 | 完善业务自动创建数据库 06 | 最终篇-通过AOP自动连接数据库-完成日志业 ...

  9. 刷题[BJDCTF2020]Mark loves cat

    解题思路 打开网页,发现是一个博客,基本寻找博客挂载信息,源码等无果后,扫描后台.发现.git泄露 .git泄露 发现.git泄露后,使用Git Extract这款工具,可自动将源码clone到本地 ...

  10. Spring整合JDBC(连接池、JDBC模板、Dao配置到Spring容器、配置文件的优化)

    1.Spring整合JDBC (1)导包(共12个): c3p0连接池.JDBC驱动(4个) Spring-jdbc.Spring-tx事务(2个) (2)JDBC模板对象(JDBCTemplate) ...