**************Gerrit 提示冲突,不能合并代码(git解决远程冲突)**************

https://blog.csdn.net/smithallenyu/article/category/6003527

https://blog.csdn.net/w_jewelry/article/details/8123639

https://blog.csdn.net/smithallenyu/article/category/6003527

 

Git分支本地操作详解

https://www.cnblogs.com/videring/articles/6962005.html

https://blog.csdn.net/u013252047/article/details/80230781

git log 和 git reflog

https://blog.csdn.net/fenglongmiao/article/details/86667516

 

https://blog.csdn.net/u013374164/article/details/79208377

https://blog.csdn.net/u013374164/article/details/79131911

https://blog.csdn.net/chaiyu2002/article/details/81181134

 

git的几个小技巧

https://blog.csdn.net/mengyafei43/article/details/39322057

git abandon某条提交导致后续提交无法merge问题

https://blog.csdn.net/AurumMann/article/details/79460573

 

Git提交代码后发现编译无法通过,后面把该条提交abandon掉,结果后续提交编译通过却无法merge,因为后面的commit是基于abandon掉的那条生成的,对于该问题

1.解决编译错误的问题

2.reset –hard 到abandon的前一条

3.cherriy-pick后面无法合并的多条提交
 

//

///

1.Gerrit里点击“publish and submit”提示如下:

Gerrit Code Review         10:57 AM
Your change could not be merged due to a path conflict.

Please merge (or rebase) the change locally and upload the resolution for review.

2.解决方法如下:

cd ~/projects/pan   #切换到pan项目
git branch   #查看分支情况
git checkout master  #选择分支
git fetch origin  #fetch与pull的区别,自己再搜吧~
git rebase origin/master  #查看有“CONFLICT (content): ”的地方,手工解决冲突后,下一步
git add dev/controller/web/index.php #这只是一个举例,即要先add操作
git rebase --continue
git push origin HEAD:refs/for/master    #OK了

git push后,你需要在Gerrit里面再次review一次。

3.本文参考博客:《Git,Gerrit,hudson(3)--git技巧总结》

虽然对git还是有些疑惑,anyway,冲突的问题还是解决了。
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值