Home > development, software > git-svn on Windows (cygwin)

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 Error.pm”.

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

Voila! git-svn should work now.

  1. kajinski
    October 7th, 2008 at 00:42 | #1

    I’ve installed git in cygwin both from setup.exe and then from source. I have subversion-perl installed. I copied down Error.pm 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. October 7th, 2008 at 08:54 | #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,
    Martin

  3. October 8th, 2008 at 02:45 | #3

    I had git-svn in /usr/sbin/git-core, but rather than running it directly, I chose to run “git svn” using the /bin/git wrapper.

    More details and issues I encountered:

    http://soi.kd6.us/2008/10/07/so-i-installed-git-and-git-svn-on-cygwin/

    kb

  4. Tommy
    October 8th, 2008 at 16:44 | #4

    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.

  5. kajinski
    October 8th, 2008 at 17:27 | #5

    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!

  6. October 8th, 2008 at 18:25 | #6

    @Tommy: well, basically git svn is just a wrapper for git-svn… but there could be PATH related issues I am not aware of.

    Best regards,
    Martin

  1. No trackbacks yet.