问题:使用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)

git将本地内容传送到远程仓库出现![rejected] master -> master (fetch first)错误的更多相关文章

  1. git 将本地项目关联到远程仓库

    初始化 在本地需要关联到远程仓库的项目根目录下执行 git init 然后关联远程仓库 [project].你需要存在一个远程仓库,名字随意,然后执行下面的命令(去掉中括号)就可以关联到该仓库. gi ...

  2. 使用Git将本地文件提交到远程仓库

    一 操作准备条件: git远程仓库已经建好了,本地文件已经存在了,现在要将本地代码推到git远程仓库保存. 解决办法如下: 1.(先进入项目文件夹)通过命令 git init 把这个目录变成git可以 ...

  3. 使用git把本地目录传到远程仓库

    需求: 要把本地不为空的一个目录和远程现有的一个仓库关联 步骤如下: git init //生成.git目录 git add . //把当前目录里的文件加入到暂存区 git commit -m '上传 ...

  4. Git——如何将本地项目提交至远程仓库

    参考文章:http://blog.csdn.net/dadaxiongdebaobao/article/details/52081826   git 将一个本地文件目录提交到远程仓库的步骤 参考文章: ...

  5. git从远程仓库拉取内容或向远程仓库上传内容

    一.将本地文件上传到远程仓库步骤 git init git add . git commit -m "初始框架" git remote add origin https://git ...

  6. git本地项目连接私人远程仓库以及遇到的问题

    一.引言 1.最开始的时候,我本地项目连接的是github远程仓库,现在要转到公司的私人远程仓库. 2.我和大家说两个事: (1)本地项目连接github远程仓库, (2)本地项目连接私人远程仓库, ...

  7. 【开发工具 - Git】之本地项目托管到远程仓库

    这里所说的“本地项目托管到远程仓库”,说的是:例如,我们在本地有一个写了很长时间的项目,现在想要托管到GitHub或码云上进行版本控制. 这个过程大致需要以下几个步骤: (1)在本地初始化Git项目本 ...

  8. Git版本控制工具(三)----远程仓库GitHub的使用

    [声明] 欢迎转载,但请保留文章原始出处→_→ 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/4 ...

  9. Git命令的使用_操作远程仓库——详细教程3

    本博文讲述将本地仓库提交到GIT@OSC(或者是GitHub),故而需要用户首先有一个GIT@OSC(或者是GitHub)帐号. 我的GIT@OSC帐号是:https://git.oschina.ne ...

随机推荐

  1. MFC CEdit控件 自动换行

    属性设置: Auto HScroll : False Auto VScroll : True Multiline        : Ture Want Return : Ture 亲自测试,值得信赖!

  2. scrapy yield

    生成器 一个带有 yield 的函数就是一个 generator,它和普通函数不同,生成一个 generator 看起来像函数调用,但不会执行任何函数代码,直到对其调用 next()(在 for 循环 ...

  3. sqlserver 用一个表的值 更新另一个表

    update cas set cas.DocumentHeaderIdOfTransferredForForm = apply.Id from dbo.CaseTransfer cas join db ...

  4. Unity shader学习之折射

    shader如下: Shader "Custom/Refraction" { Properties { _Cubemap("Cubemap", Cube) = ...

  5. sitecore系统教程之禁用xDB和Xdb跟踪

    Sitecore体验管理包含未启用体验数据库(xDB)且无需购买xDB许可证情况下使用Sitecore内容管理系统. 除了在未启用xDB的情况下运行Sitecore Experience Platfo ...

  6. Robot - 1. robot framework环境搭建

    Fom:https://www.cnblogs.com/puresoul/p/3854963.html 一. robot framework环境搭建: 官网:http://robotframework ...

  7. 【Hive学习之六】Hive Lateral View &视图&索引

    环境 虚拟机:VMware 10 Linux版本:CentOS-6.5-x86_64 客户端:Xshell4 FTP:Xftp4 jdk8 hadoop-3.1.1 apache-hive-3.1.1 ...

  8. SLAM学习笔记 - 世界坐标系到相机坐标系的变换

    参考自: http://blog.csdn.net/yangdashi888/article/details/51356385 http://blog.csdn.net/li_007/article/ ...

  9. XML文件怎么添加注释

    注释以 <!-- 开始并以 --> 结束,例如 <!--注释内容-->.   注释可以出现在文档序言中,包括文档类型定义 (DTD):文档之后:或文本内容中. 注释不能出现在属 ...

  10. CATALINA_OPTS和 JAVA_OPTS区别

    在Tomcat的catalina.sh文件中的启停server脚本中都应用到了两个变量: CATALINA_OPTS和JAVA_OPTS.用于保存Tomcat运行所需的各种参数. 他们在文件中的注释如 ...