Why does a rebase after a cherry-pick not apply the same commit twice?

前端 未结 1 1814
执笔经年
执笔经年 2020-12-28 14:33

When you cherry pick a commit from one branch (say \"topic\") to another (lets call it \"master\") the history of that commit is rewritten, its hash changes and it effectiv

1条回答
  •  失恋的感觉
    2020-12-28 14:59

    The answer is in the man page for git-rebase:

    Note that any commits in HEAD which introduce the same textual changes as a commit in HEAD.. are omitted (i.e., a patch already accepted upstream with a different commit message or timestamp will be skipped).

    Rebase looks at the textual change, and refuses to replay that commit if it already exists on the branch you're rebasing onto.

    0 讨论(0)
提交回复
热议问题