解决git版本冲突
2017-12-14 19:34
363 查看
场景:
$ git push test master To gitee.com:yoyhm/git.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@gitee.com:yoyhm/git.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
解决办法:
## 1. 产生版本冲突,将远程的pull到本地 $ git pull origin master ## 如果出现以下问题 ## ------------------------ $ git pull test master From gitee.com:yoyhm/git * branch master -> FETCH_HEAD fatal: refusing to merge unrelated histories ## ------------------------------ ## 解决上面问题 ## ------ $ git merge test/master --allow-unrelated-histories ## ------ ## 2. 再次推送即可 $ git push -u test master
相关文章推荐
- 解决git版本冲突不能push
- git版本冲突解决
- 【Git】先commit后pull由于版本冲突,提交内容看不到的解决方法
- Git - Git内部原理解析 | 解决git版本冲突
- git 本地库推送远程库 版本冲突的解决方法
- Git下使用版本回退粗暴解决冲突问题
- vs.net git版本仓库使用 之解决冲突方法 原创
- Git 分布式版本控制系统(五) ---冲突以及解决办法
- git的版本和本地版本冲突的解决方法
- git 解决版本冲突
- git跨版本解决冲突
- git 版本控制冲突解决
- Git版本控制:Git冲突解决 相关错误总结
- git分支与版本管理、版本回退、冲突解决记录
- 解决引用单个Library因android-support-v4.jar版本不同而导致的冲突
- github上的版本和本地版本冲突的解决方法
- python在linux下安装方法(解决旧版本冲突)
- eclipse解决git冲突举例
- 该如何解决Tomcat支持的J2EE版本的冲突问题
- SVN解决本地版本控制与服务器版本冲突问题