解决在一个topic branch上有多个cherry pick commit修改后repo upload 失败问题

cherry pick patch之后,又提交新的patch,会出现如下的错误: “remote reject…..no changes made”


     解决办法:
     假设先拿的A patch, 然后新的修改是B patch.
     1. 通过 git log, 取得A patch的commit id id-A, 及其前一个patch的commit id id-old。
     2. git rebase -i id-old
     3. 这时候会弹出页面,将第一行第一个命令 pick改为edit,退出。(如果提示有没提交的change,git stash 一下即可)
     4. 执行  git commit --amend,这时候弹出的commit message应该是A的,随便改改,提交。
     5. 执行  git rebase --continue,提示完成rebase。
     6. repo upload.
     后面是参考的原文,关于commit id貌似有点问题。反正git commit --amend的时候,弹出的commit界面应该是patch A 的就对了。

后面是原文:

 solve repo upload failed problem due to no changes made

最近在工作中碰到了这个问题, 在探讨一番后解决了,由于工作书面语言是英语,所以就用英语写了。

In a topic branch, when you have cherry-pick several commits, such as two commits (A and B, B is depend onA), then you made changes on latest commit B, at the end you try to repo upload, it might failed with message “remote reject…..no changes made”.

 

How to solve it?

From the “git log”, get thecommit A’s commit id,  

for example 489d62d7a0feb3e95d1e7dcdc446be1be51175f6,then do

 

git rebase -i 489d62d7a0feb3e95d1e7dcdc446be1be51175f6

  // Then it would pop up a dialog, change the onerelated to commit A from "pick" to "edit"

// then change commit A’scomment,

 git commit --amend

 git rebase --continue

 repo upload .

这样就可以顺利上传了。


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值