title: Most robust way to convert a CVS repository containing Eclipse projects to git?
body: <p>I have a situation where I have an elderly CVS repository which we would like to convert to git once and for all while keeping full history etc.</p>
  
  <p>All folders at the root of the repository contains Eclipse projects (either plain or dynamic web projects) including .classpath and .project.  We use Team ProjectSets to check out the projects we need for a given task (where the project set is located in the project containing the main, and the rest are library projects).</p>
  
  <p>When the Team ProjectSet is checked out, the workspace is fully populated.</p>
  
  <p>This approach has worked pretty well for many years (except the project set part which came with 3.5), and we would like to work in a similar way with git if possible, but we are uncertain how. </p>
  
  <p>I've played somewhat with <code>git cvs import</code> but it failed - probably due to us not using modules.</p>
  
  <p>How would you suggest we do this, and how should we work with git to allow our current usage of shared library projects?  Would we <em>HAVE</em> to introduce maven and create maven modules for our library projects?  Or just ant ivy?</p>
  
  <hr>
  
  <p>EDIT:  I've now managed to convert our CVS repository to Subversion with a suitable cvs2svn invocation and found that Eclipse recognizes the resulting Subversion repository nicely.  Unfortunately after cloning <a href="http://github.com/iteman/svn2git" rel="nofollow noreferrer">http://github.com/iteman/svn2git</a>` and trying to run bin/svn2git I get</p>
  
  <pre><code>tra@Sandbox:~/cvsgit/svn2git/svn2git$ bin/svn2git
  bin/svn2git:35:in `initialize': wrong number of arguments (2 for 1) (ArgumentError)
          from bin/svn2git:35:in `new'
          from bin/svn2git:35
  </code></pre>
  
  <p>This is with Ubuntu 10.04.1 LTS Server and I've tried various sudo things with Ruby and its gems without fully understanding what I did as I am not a Ruby programmer so I may have messed up things a bit.  I'd appreciate advice - if the easiest is to install another Linux variant to do the conversion, that is fine.</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p><a href="https://help.ubuntu.com/community/Git" rel="nofollow noreferrer">https://help.ubuntu.com/community/Git</a>
  <a href="http://css.dzone.com/articles/subversion-git-morning" rel="nofollow noreferrer">http://css.dzone.com/articles/subversion-git-morning</a></p>
  
  <hr>
  
  <p>Edit:  My first try with the default svn2git completed successfully (after a while), and I get a nice repository where <code>git branch -a</code> reports roughly </p>
  
  <pre><code>tra@Sandbox:~/gitroot/svnroot$ git branch -a
  * master
    remotes/XX64_DEPLOYED_CODE
    remotes/Beta1
    remotes/Beta2
    remotes/SV46
    ... lots more
  </code></pre>
  
  <p>We are interested in being able to check out the SV46 branch and work with it (we basically do not care about the tags, just actual branches).  I have set up gitosis and pushed this repository to gitosis, and cloned it to another computer to find out how to do the "work with SV46" bit with Eclipse.  <em>THAT</em> repository does not know of all the branches:</p>
  
  <pre><code>tra@TRA ~/git/git00 (master)
  $ git branch -a
  * master
    remotes/origin/HEAD -&gt; origin/master
    remotes/origin/master
  </code></pre>
  
  <p>Do I need to massage the original result from svn2git to get the information into the gitosis repository?  Do I need to clone with an argument?  Should I redo the svn2git step with the suggested version instead of the one shipping with Ubuntu?</p>
  
  <p>EDIT:  It turned out that publishing the svn2git generated repository with "git push --mirror" made things shown up in the gitosis repository.  I now see the following inside gitosis (trimmed):</p>
  
  <pre><code>tra@Sandbox:/srv/gitosis/repositories/git01.git$ git branch -a
  * master
    remotes/XX64_DEPLOYED_CODE
    remotes/Basic_Beta1
    remotes/Beta1
    remotes/Beta2
    remotes/SV46
    ... lots more
  tra@Sandbox:/srv/gitosis/repositories/git01.git$ git branch
  * master
  tra@Sandbox:/srv/gitosis/repositories/git01.git$ git tag -l
  tra@Sandbox:/srv/gitosis/repositories/git01.git$
  </code></pre>
  
  <p>Trying to clone this repository with <code>git clone gitosis@sandbox:git01 -b remotes/SV46</code> or <code>git clone gitosis@sandbox:git01 -b SV46</code> both tell me that the remote branch is not found upstream origin, using HEAD instead.</p>
  
  <p>Am I barking up the wrong tree?</p>