问题:使用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. 24.form表单提交的六种方式

    form表单提交方式 1.无刷新页面提交表单 表单可实现无刷新页面提交,无需页面跳转,如下,通过一个隐藏的iframe实现,form表单的target设置为iframe的name名称,form提交目标 ...

  2. php删除文件或文件夹

    <?php function deleteDir($dir) { if (!$handle = @opendir($dir)) { return false; } while (false != ...

  3. C++调用openssl库生成RSA加密秘钥对

    直接上代码.默认生成的是pkcs#1格式 // ---- rsa非对称加解密 ---- // #define KEY_LENGTH 1024 // 密钥长度 #define PUB_KEY_FILE ...

  4. node中中间件body-parser的实现方式

    最近学习了Koa框架中用到了koa-bodyparser接收表单POST请求的参数,直接使用其API是很容易的,但却不知道其原生方法怎么实现的.故做些笔记 首先,是搭建了Koa的服务器不再赘述 其次, ...

  5. install apache-activemq

    进入bin/linux-x86-64下 cd apache-activemq-5.14.1/bin/linux-x86-64/ 启动 ./activemq start 五.启动成功后,访问 activ ...

  6. Rpgmakermv(33) Mog_PictureGallery

    ============================================================================= +++ MOG - Picture Gall ...

  7. mysql的指令

    mysql有一下几方面的特性: 1:多语言支持 2:可以移植性好 3:免费开源 4:高效(支持多线程,充分利用cpu资源,运行速度非常) 5:支持大量数据查询和储存 6:操作简单易于学习 其实数据库就 ...

  8. GridFS Example

    http://api.mongodb.com/python/current/examples/gridfs.html This example shows how to use gridfs to s ...

  9. Redis性能监控

    参考地址: redis教程:http://www.runoob.com/redis/redis-tutorial.html redis百度百科:https://baike.baidu.com/item ...

  10. c# 对话框控件

    对话框也是一种窗体,通常调用对对话框相关类型的ShowDialog方法来弹出对话框,当用户关闭对话框后,该方法会返回一个DialogResult枚举值,通过该值就可以判断用户采取了什么操作,例如单击确 ...