SVN- Git migration: clean- Git branch error

I follow the SVN in Git migration guide , it git svn clonegoes fine, but when I run the cleanup command that I get this error, I'm not even sure what that means. How to 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
+4
source share
1 answer

This problem occurs when you do not specify --branchesduring the execution of a command git svn clone. You can avoid this by specifying --branchesin the performance git svn cloneas follows:

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

However, if you do not want to specify --branches, the workaround is to add a blank key "branches"to .git/config, as shown below:

[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

:

: svn-remote.svn.tags

"tags" .git/config, :

[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
+7

Source: https://habr.com/ru/post/1622982/


All Articles