Issue #3090 resolved

Import SVN to new Git repository (BB-2505)

Imhotepp
created an issue

Hi,

I am trying to import my svn repositories to a new git repository on bitbucket. The problem I have is that I can not choose a git repository and all the files are imported to a new HG repository.

  1. Can I change a HG repository to a Git repository?
  2. Can I import directly into a new Git repository?

Thank you, Dragosh

Comments (11)

  1. Erik van Zijst staff

    Hi Dragosh,

    We're still working to get git support added to the svn importer. At the moment it only imports into Hg repos, but this should fixed shortly.

    Also, you cannot change a repository's SCM type. A repo is either hg, or git (note that there are some tools out there that might help you attempt such a conversion offline).

    Erik

  2. Niels Hansen

    Hi Erik,

    Do you have an ETA when the importer will support importing to Git? I thought I was losing my mind when I tried to clone the repo I imported from SVN into bit bucket and was getting errors. I realized later that it was not imported as a git project.

    Thanks, Niels

  3. Erik van Zijst staff

    Hi Niels,

    We've got it in our current iteration that ends (and should be deployed) in 2 weeks. If you cannot wait that long, you could just create a new, empty git repo on Bitbucket and then run:

    $ svn export <svn_url> <tmpdir> && cd <tmpdir>

    $ git init && git add --all && git commit --message "Import from svn"

    $ git push git@bitbucket.org:username/repo master

    Which is effectively what the importer does.

    Cheers,

    Erik

  4. Erik van Zijst staff

    Hi Mladen,

    I fully agree that without history, it's not much of an import. However, offering real proper history imports is tricky. We are aware of the tools, but we'll have to offer something that works equally well for both Git and Mercurial and during our initial internal testing last year we consistently ran into issues, especially when processing large repositories. The result of all this is that we did not feel like we would be able to offer a solution that "just works".

  5. Log in to comment