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