首页 > 其他 > 详细

从远程pull 本分支的新修改应用到本地

时间:2017-07-08 12:47:29      阅读:277      评论:0      收藏:0      [点我收藏+]
1.环境
ubuntu16.04 gerrit
 
2.问题
  branch-1的本地修改落后于远程。需要将远程修改pull到本地。但是pull之后本地会出现多个提交,无法
  将 merge信息推送到远程。原因:two different commits for the same changes
 
3.解决方法
  1. git pull git://git.openstack.org/openstack-dev/sandbox refs/changes/31/48153x/4
  2. 手动修改冲突
  3. git commit -a,将修改提交到本地
  4. git reset --soft HEAD^  , 将两次修改合并为一次
     (revert latest duplicate commit and merge the same with existing one.)
  5. git commit --amend

从远程pull 本分支的新修改应用到本地

原文:http://www.cnblogs.com/yingfeicaozhang100527/p/7136323.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!