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 ...
随机推荐
- java 运行时异常与非运行时异常理解
参考:https://blog.csdn.net/lan12334321234/article/details/70049446 所谓的异常就是阻止当前程序或方法继续执行的问题 java异常分为两种: ...
- shell编程:for循环
有几个参数执行几次 do done取代了{} 这种用于 文件的个数,用户的个数等. (())里才可以进行加减乘除.
- sql 存储过程命名规范
规范的命名可以提高开发和维护的效率,如果你正在创建一个新的存储过程,请参考如下的命名规范. 句法: 存储过程的命名有这个的语法:[proc] [MainTableName] By [FieldName ...
- [ Learning ] Spring Resources
1. Spring MVC Spring MVC原理及配置详解 springMVC系列之(三) spring+springMVC集成(annotation方式) Mybatis3+Spring4+Sp ...
- 17. Letter Combinations of a Phone Number(bfs)
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that th ...
- Python全栈-库的操作
一.系统数据库 安装数据库系统后,系统自带的数据库.通过mysql客户端连接数据库系统后,使用show命令可查看系统中存在的所有库: mysql> show databases; +------ ...
- Python全栈-day10-函数2
函数高级篇 1.函数嵌套 1)嵌套定义 在函数内定义另外一个函数 def func(): print('嵌套定义') def func1(): print('这是一个嵌套函数') def func2( ...
- linux小倒腾
1.vim安装,sudo apt-get install vim-gtk,于是vim就安装好了.当然在我电脑上还出现了gvim,简单的vim配置(etc/vim/vimrc): "我的设置 ...
- html5-块元素和内联元素
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8&qu ...
- XMLHttpRequest对象(Ajax)的状态码(readystate) HTTP状态代码(status)
2018-11-28 14:19:00 来自 :XMLHttpRequest对象(Ajax)的状态码(readystate) HTTP状态代码(status) XMLHttpRequest对象(Aj ...