【问题标题】:Git how do i rebase out certain commits?Git如何重新确定某些提交?
【发布时间】:2013-08-07 21:03:18
【问题描述】:

这是我的树:

    C (featureB)
    |
    |
A - H (master)
|
|
|- H - D (featureA)

我想让它变成

    C - D (featureB)
    |
    |
A - H (master)
|
|
|- H - D (featureA)

如何在 git 中做到这一点?

【问题讨论】:

  • 这不是“rebase out”,更像是“rebase in”。 :-) 或者更确切地说是樱桃采摘,正如@Cupcake 所说。

标签: git rebase git-pull git-fetch


【解决方案1】:

你可以cherry-pickD转featureB:

$ git checkout featureB
$ git cherry-pick D

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-12-06
    • 1970-01-01
    • 2020-10-08
    • 2023-03-10
    • 1970-01-01
    • 1970-01-01
    • 2013-08-06
    • 2015-07-22
    相关资源
    最近更新 更多