git-svn on Windows (cygwin)

Update 2008-10-10: Often perl will not work due to memory-remapping problems. A solution can be found in my article about the issue.

What I really love about Git is the fact that it nicely integrates with existing Subversion repositories. At our company, we are using Subversion as our SCM, but I personally like Git more and I want to use it as a side tool for more flexible branching, merging, and for checking in versions I wouldn’t check in the shared repository.

Git is supplied with git-svn, which can import an existing SVN repository and also commit back to it. Under cygwin, you need to perform two additional steps for getting git-svn to work, otherwise it is likely to fail with “failed to include”.

You need to download from CPAN. You have to save it to <cygwin-dir>\lib\perl5\

Voila! git-svn should work now.

6 thoughts on “git-svn on Windows (cygwin)”

  1. I’ve installed git in cygwin both from setup.exe and then from source. I have subversion-perl installed. I copied down as described above. I ran ash rebaseall as described elsewhere.

    git-svn is still nowhere to be found in cygwin.

    I get “git-svn: command not found”

    what am I doing wrong?

  2. Hi,

    verify if there is [cygwindir]\bin\git-svn available on your system. By default it should be installed together with the normal git package of cygwin.

    Also try entering /bin/git-svn if it can be found. Other git operations are working?

    Best regards,

  3. The command is not git-svn, its ‘git svn’. If you install what is above you should be able to get ‘git help svn’ to show you the man page for it.

  4. wow. I knew I must’ve been doing something stupid!
    looks like I do have “git svn” command available.

    thanks for helping a noob guys!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.