git-svn not a git command?

前端 未结 13 1747
迷失自我
迷失自我 2020-12-04 14:09

While attempting to get an old svn dump of a project under git control, I ran into an interesting problem. Whenever I run git svn, I get an error saying it isn

相关标签:
13条回答
  • 2020-12-04 14:29

    On CentOS I used

    sudo yum install git-svn
    
    0 讨论(0)
  • 2020-12-04 14:30

    Under my system I've had this trouble:

    $ git svn
    Can't locate SVN/Core.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0
    /usr/lib/perl5/5.10.0/i486-linux-thread-multi
    /usr/lib/perl5/5.10.0
    /usr/lib/perl5/site_perl/5.10.0/i486-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.8
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.10.0/i486-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.10.0
    /usr/lib/perl5/vendor_perl/5.8.8
    /usr/lib/perl5/vendor_perl .) at
    /usr/libexec/git-core/git-svn line 29.
    

    because I don't have Subversion Perl bindings installed. Try installing them and running the command again.

    0 讨论(0)
  • 2020-12-04 14:32

    I had the same error under Cygwin 1.7. It was solved by installing the git-svn package with Cygwin setup.

    0 讨论(0)
  • 2020-12-04 14:32

    Had a similar problem on RHEL6, i.e.,

    Can't locate Git/SVN.pm in @INC (@INC contains: /usr/local/share/perl5 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/libexec/git-core/git-svn line 25.

    My solution:

    sudo yum install subversion-perl
    chmod 755  /usr/local/share/perl5/ (and sub dirs, as they were only readable by root)
    
    0 讨论(0)
  • 2020-12-04 14:38

    I just check on my newly installed ubuntu box and it wasn't installed even with git-core installed. A simple:

    sudo apt-get install git-svn
    

    or your distro equivalent should fix it.

    0 讨论(0)
  • 2020-12-04 14:40

    MacPorts version:

    port install git +svn
    

    (Note: you likely need to port deactivate git first)

    0 讨论(0)
提交回复
热议问题