Search code examples
svngitgit-svn

git-svn not a git command?


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't a git command, yet there is documentation for it that I can pull up using git help. Is there something wrong with my install, or am I just missing something here?

Edit: I should probably also mention that I am running msysGit version 1.6.1.9.g97c34 under Windows XP, and the error I get is:

$ git svn 
git: 'svn' is not a
git-command. See 'git --help'.

Did you mean one of these?
        fsck
        show

Solution

  • 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.