To create a branch in bazaar, I can do two things:
or
My questions:
I wasn't sure what would happen when a checkout with local commits was pushed, so I tried it out.
It turns out that in both cases, you'll end up with history like:
trunk:
branch:
However, branching first and working with a checkout of the branch is a much better way to do it. If you have a checkout with local commits and do a bzr update
you won't be able to bzr push
before committing.
Secondly, if you have a checkout of the trunk with local commits, 'bzr push' to create the branch, then try to 'bzr switch` to the branch, you first have to commit or revert to avoid the "Cannot switch as local commits found in the checkout" error.