> To rebase the part-2 and part-3 branches, we would have to run something like this:
# Rebase commit 4 and commit 5 on top of the part-1 branch
git checkout andrew/feature-xyz/part-2
git rebase HEAD~2 --onto andrew/feature-xyz/part-1
# Rebase commit 6 on top of the (now rebased) part-2 branch
git checkout andrew/feature-xyz/part-3
git rebase HEAD~ --onto andrew/feature-xyz/part-2
What's the supposed benefit of this over simply the following?
git rebase andrew/feature-xyz/part-1 andrew/feature-xyz/part-2
git rebase andrew/feature-xyz/part-2 andrew/feature-xyz/part-3
This won't work correctly because after the first command, part-2 will no longer be an ancestor of part-3. It will try to rebate commits that already exist on the target, leading to unnecessary and difficult merge conflicts.