git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.mark

you now have, in the new git project, a "master" branch with all the history from the bzr repository and all tags.

-- 
Gabriel Filion
Previous: Ævar Arnfjörð BjarmasonNext: Dmitri Pissarenko
Message 3 of 8 in “How to import bzr repository into git”
  1. Dmitri PissarenkoNov 16, 2010
  2. Ævar Arnfjörð BjarmasonNov 16, 2010
  3. Gabriel FilionNov 17, 2010
  4. Dmitri PissarenkoNov 18, 2010
  5. Ævar Arnfjörð BjarmasonNov 18, 2010
  6. Jonathan NiederNov 18, 2010
  7. Jonathan NiederNov 18, 2010
  8. Gabriel FilionNov 19, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.