Github上的版本和本地版本冲突的解决方法
Github上的版本和本地版本冲突的解决方法
远程和本地版本冲突
情景:
在github上创建项目,然后本地git init
然后没有git pull -f --all
然后git add . | git commit -am "init"
导致github上的版本里有readme文件和本地版本冲突,下面给出冲突原因:
[master][~/Downloads/ios] git push -u origin masterUsername for 'https://github.com': shiren1118
Password for 'https://shiren1118@github.com':
To https://github.com/shiren1118/iOS_code_agile.git! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/shiren1118/iOS_code_agile.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
查看大部分资料,只有这个有用
参考来源:http://www.cnblogs.com/xwdreamer/archive/2012/05/29/2523958.html
强制覆盖
勾选强制覆盖已有的分支(可能会丢失改动),再点击上传,上传成功。
只有这句是核心,所以,本人就略微想了一下
[master][~/Downloads/ios] git push -u origin master -f
git push -u origin master -f
至此,搞定问题
Github上的版本和本地版本冲突的解决方法相关推荐
- github上的版本和本地版本冲突的解决方法(Updates were rejected because the tip of your current branch is behind)
github上的版本和本地版本冲突的解决方法(Updates were rejected because the tip of your current branch is behind) 参考文章: ...
- 全局Angular CLI版本大于本地版本
本文翻译自:Global Angular CLI version greater than local version When running ng serve I get this warning ...
- 我爱Java系列---【 maven依赖版本冲突的解决方法】
我爱Java系列---[ maven依赖版本冲突的解决方法] 参考文章: (1)我爱Java系列---[ maven依赖版本冲突的解决方法] (2)https://www.cnblogs.com/hu ...
- dll版本冲突的解决方法
dll版本冲突的解决方法 参考文章: (1)dll版本冲突的解决方法 (2)https://www.cnblogs.com/mcgrady/p/5674428.html 备忘一下.
- 苹果IOS14版本自建服务器无法下载解决方法
苹果IOS14版本自建服务器无法下载解决方法 IOS14版本APP提示下载失败 ios系统更新到14.0后,用户从自建服务器上下载app提示无法下载 前提条件,公司拥有HTTPS类型的网站 ios在1 ...
- Windows IIS注册asp 此操作系统版本不支持此选项 错误解决方法
Windows IIS注册asp 此操作系统版本不支持此选项 错误解决方法 参考文章: (1)Windows IIS注册asp 此操作系统版本不支持此选项 错误解决方法 (2)https://www. ...
- 【转】Windows IIS注册asp 此操作系统版本不支持此选项 错误解决方法
[转]Windows IIS注册asp 此操作系统版本不支持此选项 错误解决方法 参考文章: (1)[转]Windows IIS注册asp 此操作系统版本不支持此选项 错误解决方法 (2)https: ...
- 测绘——CAD2008+CASS9.1批零插入图块不成功及打开低版本dwg报内部错误的解决方法
CAD2008+CASS9.1批零插入图块不成功及打开低版本dwg报内部错误的解决方法 博主最近在做地籍调查项目,很多时候需要对地形图数据进行整合拼接以及投影转换,需要对分幅数据进行整合,此时**&q ...
- Git冲突与解决方法【转】
本文转载自:https://www.cnblogs.com/gavincoder/p/9071959.html Git冲突与解决方法 1.git冲突的场景 情景一:多个分支代码合并到一个分支时: 情景 ...
最新文章
- windows msys编译64位x264和ffmpeg
- 使用 Bridge to Kubernetes 简化云端开发
- 【CC精品教程】任务三:CC刺像控点,提交空三,新建重建项目(三维格网、三维点云、DOM和DSM)
- python文件替换一行_python自动化替换文件中每一行中的特有字符串
- CMake configure_file命令
- ORACLE11g安装过程-windows
- JAVA面向对象OOP多态→抽象类abstract、接口interface实现implement、final不变修饰符、样例代码
- java分布式面试题_2021,Java最全的分布式面试题合集附答案,共2w字!
- 30本互联网相关的电子书
- 几种非接触涂层测厚方法原理对比
- python中自然数怎么表示_Python Numpy 自然数填充数组的实现
- video 标签 autoplay 实现自动播放
- vr全景怎么拍摄和制作,3dvr全景制作教程
- ecc6.0 oracle安装,SAP ECC v6.0 SR3 IDES Oracle 10.2.0.2 安装指南
- RK3588和RK3588S芯片介绍
- Ubuntu1804磁盘容量不足
- opencv 二维图像 特征检测 特征描述 特征匹配 平面物体识别跟踪
- 端午节-怀念1996之QB45坦克对战游戏
- 支持向量机(SVM)--小样本
- echart简单介绍