Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN-Git migration: clean-git branch error

I'm following the SVN to Git migration guide, the git svn clone goes fine but when I run the cleanup command I get this error, I'm not even sure what this means. How do I solve this ?

java -Dfile.encoding=utf-8 -jar ~/svn-migration-scripts.jar clean-git
Could not retrieve the config for the key: svn-remote.svn.branches
like image 650
blackbird Avatar asked Jan 05 '16 20:01

blackbird


1 Answers

This problem comes up when you are not specifying the --branches while running the git svn clone command. You can avoid it by specifying the --branches while executing the git svn clone as follows:

git svn clone --username=ArpitAggarwal --branches=/dev --authors-file=C:/Users/ArpitAggarwal/authors.txt http://localhost:81/svn/project/branches/ dev-git

Still if you don't want to specify --branches, a workaround is to add an empty "branches" key in .git/config, as follows:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[svn-remote "svn"]
    url = http://localhost:81/svn/project/branches
    branches = 
[svn]
    authorsfile = C:/Users/ArpitAggarwal/authors.txt

For similar error with tags:

Could not retrieve the config for the key: svn-remote.svn.tags

add an empty "tags" key in .git/config, as follows:

[core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
        hideDotFiles = dotGitOnly
    [svn-remote "svn"]
        url = http://localhost:81/svn/project/branches
        branches = dev/*:refs/remotes/origin/*
        tags =  
    [svn]
        authorsfile = C:/Users/ArpitAggarwal/authors.txt
like image 153
Arpit Aggarwal Avatar answered Nov 04 '22 17:11

Arpit Aggarwal