zoukankan      html  css  js  c++  java
  • git 报错:error: failed to push some refs to 'https://github.com/Anderson-An/******.git'(已解决)

    提交push 报错:

    $ git push origin master
    To https://github.com/Anderson-An/******.git
    ! [rejected] master -> master (fetch first)
    error: failed to push some refs to 'https://github.com/Anderson-An/******.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.

    这是因为远程库里面有个文件,但是本地没有这个文件,完全提交上去会覆盖之前的文件(通常是因为远程库自动生成了一个REMAND.MD的文件原因,但是本地没有add到这个文件)

    我们直接强制push 下就可以了:

    $ git push -u origin master -f

  • 相关阅读:
    selennium模块
    urllib模块
    有关爬虫模块
    爬虫_requests_html
    爬虫x_path
    项目上线
    navicat使用 pymysql操作数据库 sql注入及增删改查
    基本查询语句和方法,连表,子查询
    表与表之间的关系
    存储引擎 数据类型
  • 原文地址:https://www.cnblogs.com/Anderson-An/p/10142538.html
Copyright © 2011-2022 走看看