Re: How to import bzr repository into git
- From
Gabriel Filion <lelutin@gmail.com>
- Date
- Nov 17, 2010, 00:22 UTC
- Message-ID
- <4CE32062.6010308@gmail.com>
- In-Reply-To
- <AANLkTimPmPOJq64=VePSb2efsx17j8BNxCLt_i=b2ykW@mail.gmail.com>
On 11/16/2010 02:57 PM, Dmitri Pissarenko wrote:
Show 7 quoted lines
> Hello! > > I want to migrate one of my projects from Bazaar to git, preserving the history. > > How can I do that in Windows (import an existing Bazaar project into a > new/empty git repository) ? >
Have a look at "bzr-fastimport" [1]. it's a Bazaar plugin that can help you to transform the bzr history into a git one.
[1]: https://launchpad.net/bzr-fastimport
I haven't done a lot of testing with shared-tree Bazaar repositories (a repository with multiple branches in it) but I suspect it would not work very well with such a layout.. If you're doing a one-time conversion of a one-branch repository, it works pretty well.
Once Bazaar and the bzr-fastimport plugin are installed, you mostly need to run those commands :
git init project
cd project
bzr fast-export --export-marks=../bzr.mark /path/to/old/bzr/project
| git-fast-import --export-marks=../git.markyou now have, in the new git project, a "master" branch with all the history from the bzr repository and all tags.
-- Gabriel Filion