How do I rebase a chain of local git branches?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Suppose I have a chain of local git branches, like this: master branch1 branch2 | | | o ---- o ---- o ---- A ---- B ---- C ---- D I pull in an upstream change onto the master branch: branch1 branch2 | | A ---- B ---- C ---- D / o ---- o ---- o ---- o | master Now I rebase branch1, giving me this: branch2 | A ---- B ---- C ---- D / o ---- o ---- o ---- o ---- A '---B' | | master branch1 Note that because of rebasing branch1, commits A and B have been rewritten as A' and B'. Here's my problem: now I want to rebase branch2. The