top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to use SVN repository with Git?

+1 vote
519 views

I would like to use Git with a SVN, so I try to clone the SVN repo with "git svn clone svn://myserver", it is a repo without trunk etc. Git reports the error "Couldn't find a repository". The SVN repo uses an authentification (username & password) and a normalsvn checkout works well.
How can I use the SVN repo with Git?

posted Sep 14, 2013 by Ahmed Patel

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Start with having a look at the "git svn" man-page ("git svn --help"). Read up on the parameters to the clone command: -T, -t, -b, --username.

If that doesn't help you out then come back here with the SVN folder structure so it becomes easier to help you out.

answer Sep 14, 2013 by Naveena Garg
If that doesn't help you out then come back here with the SVN folder structure so it becomes easier to help you out.

Also please provide us with the exact command/path which is working for SVN, and which one is failing for git svn (anonymize server hosts if you wish).
Similar Questions
+2 votes

I am trying to git-svn clone https://svn.calendarserver.org/repository/calendarserver/CalendarServer/
and I cannot say I am much successful. Every couple of hundred of commits I get this:

RA layer request failed: REPORT of '/repository/calendarserver/!svn/vcc/default': could not connect to
server (https://svn.calendarserver.org) at /usr/local/share/perl5/Git/SVN/Ra.pm line 290.

and git-svn stops. When restarting git svn fetch, it fetches another couple of hundred commits and then fails again. Given that there are 11000+ commits just in the trunk, I am afraid of a long long night. Did anybody managed to clone this repo? Or is there some way how to make git-svn more patient (this error
means the SVN server is a bit flakey, right)?

+1 vote

I am trying to move from svn to GIT. With svn I use ssh and a svnserve wrapper like this one :

#!/bin/shumask 002exec /usr/bin/svnserve "$@" -r /very/long/path/to/projets

So I can use URI like this one : svn co svn+ssh://me@my-server.com/my-super-project/trunk
How can I achieve the same behavior with git (i.e. something like git clone me@my-server.com:my-super-project) ?

+3 votes

We are tasked to move a code branch named "A" within SVN repo to Git. We also have trunk merges going on between "A" and trunk in SVN.Is it possible to set up with Git and SVN such that1) Trunk changes in SVN could be propagated to Git version control ?If not, how can we resolve this need with an efficient setup?

We don't think it is possible but we like to confirm.

...