• git将本地内容传送到远程仓库出现![rejected] master -> master (fetch first)错误


    问题:使用git push -u 远程库名 master 命令将本地提交的内容传到git远程库时出现错误:

    命令: git push -u origin master

    出现错误:
      To https://github.com/imjinghun/university.git
      ! [rejected] master -> master (fetch first)
      error: failed to push some refs to 'https://github.com/imjinghun/university.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.


    解决:使用 git push -f 命令重新传一遍就可以成功了

    命令:git push -f

    结果:
      Counting objects: 5739, done.
      Delta compression using up to 4 threads.
      Compressing objects: 100% (5341/5341), done.
      Writing objects: 100% (5739/5739), 205.84 MiB | 40.00 KiB/s, done.
      Total 5739 (delta 1847), reused 0 (delta 0)
      remote: Resolving deltas: 100% (1847/1847), done.
      remote: warning: GH001: Large files detected. You may want to try Git Large File
      Storage - https://git-lfs.github.com.
      remote: warning: See http://git.io/iEPt8g for more information.
      remote: warning: File ed5d681ab7d6af5905bcbae56de9ee0477d9ef3b is 60.34 MB;
      this is larger than GitHub's recommended maximum file size of 50.00 MB
      To https://github.com/imjinghun/university.git
      + cd5b93f...83b3d6c master -> master (forced update)

  • 相关阅读:
    Spring set注入
    Spring 搭建
    MyBatis 动态Sql
    Mybatis 数据读取
    MyBatis 搭建
    第三十二章:Map集合
    第三十一章:集合输出
    第三十章:Set集合
    第二十八、九章:类集框架简介、List集合
    第25、26、27章:类加载器、反射与代理设计模式、反射与Annotation
  • 原文地址:https://www.cnblogs.com/jinghun/p/7268008.html
Copyright © 2020-2023  润新知