I'm trying to convert some old Bazaar repositories to git, and while everything seem to go through smoothly, I'm a bit unsure if it really went as well as it claimed.
My Bazaar repository is structured like so:
- repo
- trunk
- prod
- feature/feature-branchX
- feature/feature-branchY
I'm using the fast-export/fast-import method for migrating between bzr
and git
.
Initially, I migrate the "trunk", with --export-marks, like so:
bzr fast-export --export-marks=../$1/marks.bzr ../$1/trunk | git fast-import --export-marks=../$1/marks.bzr --export-marks=../$1/marks.git
With $1 being the name of the
then iterate all other folders in the "repo" directory and call:
bzr fast-export --marks=../$1/marks.bzr --git-branch=$nick ../$1/$b/.. | git fast-import --import-marks=../$1/marks.git --export-marks=../$1/marks.git
with $nick
being the branch nickname of bzr
, and $1
/$b
being the directory name of the branch.
As I said, it processes all the expected directories, but after completion, when I do a:
git branch
It shows just 20 something branches, where the original Bazaar repository had 80+.
Now, just looking at "master" in git, it seems to be all there, and the missing 60 branches could easily be branches who are already merged into trunk. But I'm not really sure the fast-export/fast-import tools are clever enough to say "bah - you won't need this", but maybe they are.
Does anyone have any experience with this?
Am I only supposed to be left with "master" and any branch who has unmerged commits in them after migrating from bzr to git?
Finally, for the sake of history, is there any way to force all branches to be converted over, even if they are technically defunct?