git-svn not a git command?

前端 未结 13 1713
迷失自我
迷失自我 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:16

    If git-svn is not part of mSysGit, I recommend using a small UNIX server to host your gateway repository that clones your svn repository, and then clone that repository onto your Windows machine. This is the approach I am using for interacting with CVS from git.

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

    I am not sure that git svn has ever worked with recent Git Windows distribution (post 1.5.6).

    Many problems have been reported before, so git svn may very much be not included in current msysGit releases.

    Another current active "Git on Windows" development mingw.git does state in its README that svn does not work.

    This thread of Msysgit does suggest that git svn may be reintegrated at some points, but progress are still slow.


    Update: from MSysGit1.6.2 (early March 2009), git-svn works again. See this SO question.


    Update: with a modern (2017) Git for Windows 2.x, git svn is already included.
    No need for sudo apt-get install git-svn, which would only be possible in a WSL (Windows Subsystem for Linux) shell session anyway.

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

    On Ubuntu:

    sudo add-apt-repository ppa:git-core/ppa
    apt-get update
    sudo apt-get install git-svn
    
    0 讨论(0)
  • 2020-12-04 14:18

    On Fedora I had to install it with

    sudo dnf install -y git-svn
    
    0 讨论(0)
  • 2020-12-04 14:20

    For posterity: On CentOS 7, just run sudo yum install git-svn.

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

    It wasn't installed on my fresh install of Ubuntu on WSL -

    sudo apt install git-svn
    

    sorted it:

    ❯ git svn
    git-svn - bidirectional operations between a single Subversion tree and git
    ...
    
    0 讨论(0)
提交回复
热议问题