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)
git将本地内容传送到远程仓库出现![rejected] master -> master (fetch first)错误的更多相关文章
- git 将本地项目关联到远程仓库
初始化 在本地需要关联到远程仓库的项目根目录下执行 git init 然后关联远程仓库 [project].你需要存在一个远程仓库,名字随意,然后执行下面的命令(去掉中括号)就可以关联到该仓库. gi ...
- 使用Git将本地文件提交到远程仓库
一 操作准备条件: git远程仓库已经建好了,本地文件已经存在了,现在要将本地代码推到git远程仓库保存. 解决办法如下: 1.(先进入项目文件夹)通过命令 git init 把这个目录变成git可以 ...
- 使用git把本地目录传到远程仓库
需求: 要把本地不为空的一个目录和远程现有的一个仓库关联 步骤如下: git init //生成.git目录 git add . //把当前目录里的文件加入到暂存区 git commit -m '上传 ...
- Git——如何将本地项目提交至远程仓库
参考文章:http://blog.csdn.net/dadaxiongdebaobao/article/details/52081826 git 将一个本地文件目录提交到远程仓库的步骤 参考文章: ...
- git从远程仓库拉取内容或向远程仓库上传内容
一.将本地文件上传到远程仓库步骤 git init git add . git commit -m "初始框架" git remote add origin https://git ...
- git本地项目连接私人远程仓库以及遇到的问题
一.引言 1.最开始的时候,我本地项目连接的是github远程仓库,现在要转到公司的私人远程仓库. 2.我和大家说两个事: (1)本地项目连接github远程仓库, (2)本地项目连接私人远程仓库, ...
- 【开发工具 - Git】之本地项目托管到远程仓库
这里所说的“本地项目托管到远程仓库”,说的是:例如,我们在本地有一个写了很长时间的项目,现在想要托管到GitHub或码云上进行版本控制. 这个过程大致需要以下几个步骤: (1)在本地初始化Git项目本 ...
- Git版本控制工具(三)----远程仓库GitHub的使用
[声明] 欢迎转载,但请保留文章原始出处→_→ 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/4 ...
- Git命令的使用_操作远程仓库——详细教程3
本博文讲述将本地仓库提交到GIT@OSC(或者是GitHub),故而需要用户首先有一个GIT@OSC(或者是GitHub)帐号. 我的GIT@OSC帐号是:https://git.oschina.ne ...
随机推荐
- 多表关联查询_resultMap_集合对象
多表关联查询_resultMap_集合对象_N+1方式实现 package com.bjsxt.mapper; import java.util.List; import com.bjsxt.pojo ...
- idea上更新文件到github上
1.不是最新文件,那么文件颜色就不一样.操作如下: 2.本地提交 .提交文件列表,提交说明,文件前后对比,确定了后就提交 3.推送到github. (1) (2)
- Rpgmakermv(33) Mog_PictureGallery
============================================================================= +++ MOG - Picture Gall ...
- asp.net GridView增加删除功能
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { string id ...
- laravel 服务容器实例——深入理解IoC模式
刚刚接触laravel,对于laravel的服务容器不是很理解.看了<Laravel框架关键技术解析>和网上的一些资料后对于服务容器有了一些自己的理解,在这里分享给大家 1.依赖 IoC模 ...
- hive中的with用法
hive 可以通过with查询来提高查询性能,因为先通过with语法将数据查询到内存,然后后面其它查询可以直接使用,这种方法与创建临时表类似但是不需要创建临时表实体表,内存中的子查询结果在会话结束后会 ...
- python相关工具
1.matlab与python之间的数据传递 import scipy.io as sio import numpy as np ###下面是讲解python怎么读取.mat文件以及怎么处理得到的 ...
- myeclipse项目导入IDEA
1.import project from external model (不需要删除myeclipse多余文件) https://blog.csdn.net/d276031034/artic ...
- 算法提高 c++_ch02_01 (强制类型转换)
编写一个程序,利用强制类型转换打印元音字母大小写10种形式的ASCII码. 输出的顺序为:大写的字母A,E,I,O,U的ASCII码,小写的字母a,e,i,o,u的ASCII码.所有的ASCII码都用 ...
- SQL表分区之二
前面说的给表做表分区,现在有个问题,比如上面我们说的是按照20w为一个分割线,那些现在我们想把这个调整下怎么办?难道要把之前的分区函数和分区方案删了,重新新建分区函数和分区方案嘛? 当然,此方式肯定是 ...