1
master ---A---B
               \
feature1        C

像上面这样有两个分支。在提交 C 之后,我使用“git commit --amend”修改了版本 B。修订版 C 是否可以获取我对 B 所做的更改?

4

1 回答 1

4

这将在提交 b 上重放 c 中的更改:

git checkout feature1
git rebase b

或者:

git checkout feature1
git rebase master
于 2014-02-24T23:15:02.153 回答