Failed importing code from SVN to GIT – SVN trunk is empty

I try to clone my SVN (assembla) repository to GIT one (bitbucket)

I used bitbucket wizard importing code from SVN to GIT online

  • Should generated documentation go into source control?
  • For a .Net project, what file extensions should I exclude from source control?
  • How to apply gitignore afterwards?
  • VSS or SVN for a .Net Project?
  • Bazaar + CruiseControl.Net
  • NuGet Enterprise - best practices for different maturity levels of packages
  • But I got the following error:

    23:58:39 svn import for: https://subversion.assembla.com/svn/ugisvn/trunk
    23:58:39 Checking out https://subversion.assembla.com/svn/ugisvn/trunk...
    23:58:40 A elad2109/elad2109/bb_tmp
    23:58:40 Exported revision 59.
    23:58:40 Done
    23:58:40 Subversion checkout successful
    23:58:40 Creating new git repository...
    23:58:40 Initialized empty Git repository in elad2109/elad2109/bb_tmp/.git/
    23:58:40 Done
    23:58:40 Done
    23:58:40 # On branch master
    23:58:40 #
    23:58:40 # Initial commit
    23:58:40 #
    23:58:40 nothing to commit (create/copy files and use "git add" to track)
    23:58:40 Unable to convert svn checkout to git
    23:58:40 Svn checkout failed: <class 'bitbucket.apps.async.tasks.ImportException'>: Command failed. Return value: 1
    

    But how can I fix it?

    Solved:

    My two problems were solved:

    1. missing Author – I had to verify my registartion email to bitbucket.org

    2. empty trunk – I just gave one higher level of SVN repository

  • git stash `No local changes` but git status `ahead of origin/master by 3 commits`
  • How to import svn branch to git with trunk history
  • Showing branch hierarchy at the command line?
  • Git how to commit a single staged files?
  • Query git reflog for all commits to a specific file
  • How to pull local master into local branch
  • 3 Solutions collect form web for “Failed importing code from SVN to GIT – SVN trunk is empty”

    Solved my two problems:

    missing Author – I had to verify my registartion email to bitbucket.org

    empty trunck – just gave one higher level of SVN repository

    Try using the command line. You must fiddle with your authors file.
    Basically for any “No existing author found” you must add a none entry in your authors.txt file

    elad2109 = none <none@none.com>

    Here’s a good tutorial on manual migration:
    http://taombo.com/taombo-blog/moving-your-svn-repositories-to-git-on-bitbucket

    Regards,
    Zeno.

    I don’t know how Bitbucket’s SVN importer works, but based on 23:58:40 # Initial commit 23:58:40 # 23:58:40 nothing to commit (create/copy files and use "git add" to track) it seems that they have a custom system which uses git add and commands like that. SVN supports commits which don’t modify any files, whereas normally Git requires each commit to have at least one file. Maybe Bitbucket’s SVN importer can’t handle empty commits correctly.

    It might be best to use git-svn to do the import manually – anyways that is needed when importing unstructured SVN repositories which don’t always strictly follow the standard layout. Here are some of my experiences on importing repositories to Git: http://blog.orfjackal.net/search/label/git

    Git Baby is a git and github fan, let's start git clone.