The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

In case I ever want to import another SVN repository into GitHub (for instance form SourceForge)

Posted by jpluimers on 2025/08/27

The odd thing is that SourceForge has (sf.net) a GitHub project importer (for more than 10 years now!), but not vice versa. You can import a SVN repository in GitHub, but that’s far from importing a complete sf.net project.

More on the importer to import GitHub to SourceForge below, but first the other way around:

These steps worked to get xn-resource-editor.sf.net into github.com/jpluimers/XN-Resource-Editor-TWM (which I did because the GitHub web UI is so much better at browsing and searching commits and files than the SourceForge web UI):

  1. Navigate to https://sourceforge.net/projects/xn-resource-editor/
  2. Click on “Code” to get to https://sourceforge.net/p/xn-resource-editor/code/HEAD/tree/
  3. Note the HTTPS svn URL https://svn.code.sf.net/p/xn-resource-editor/code/ from the “HTTP Access” field svn checkout https://svn.code.sf.net/p/xn-resource-editor/code/ xn-resource-editor-code
  4. Navigate to https://github.com/new/import
  5. Paste the above svn URL into the “Your old repository’s clone URL” field
  6. Choose an “Owner” from the dropdown
  7. Type a new repository name into the “Repository Name” field
  8. Click the “Begin Import” button
  9. Wait for the import to finish
  10. Map SourceForge users to GitHub users (this requires:
    1. finding the user on GitHub
    2. locally cloning a repository they contributed to with git clone
    3. using git log to find commits they did
    4. copy their email address from there
    5. paste the email address in the user mapper

    ) in this case at https://github.com/jpluimers/XN-Resource-Editor-TWM/import (I think you can fixup these later by revisiting that link).

Note there are limitations:

  • this fails to import any releases or issues/messages
  • you cannot keep both repositories in sync this way (doing so is hard to begin with)

It is a lot better than manually doing this, which you can still can for instance with the steps in the script at [Wayback/Archive] import a sourceforge project (with full history) to github (forked from [Wayback/Archive] import a sourceforge project (with full history) to github):

In order to clone the TVN application from sourceforge to github I performed the following steps.
rsync -av rsync://tnv.cvs.sourceforge.net/cvsroot/tnv/* .
svn export --username=guest http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk
cp ./cvs2svn-trunk/cvs2git-example.options ./cvs2git.options
vim cvs2git.options
cvs2svn-trunk/cvs2git --options=cvs2git.options --fallback-encoding utf-8
git@github.com:binarytemple/tnv.git tnv-github
git clone git@github.com:binarytemple/tnv.git tnv-github
cd tnv-github
cat ../cvs2git-tmp/git-{blob,dump}.dat | git fast-import
git log
git reset --hard
git push

It is based on [Wayback/Archive] version control – Migrate from CVS to Git without losing history – Stack Overflow (thanks [Wayback/Archive] Ahmed Alaa and [Wayback/Archive] rubo77) which has many other related answers and questions as well that you can use as a starting point to keep both repositories in sync. Apparently there is no good “one size fits all” solution to solve this.

The SourceForge GitHub importer

SourceForge has a seperate importer for GitHub that imports most of what I could think of:

  • Source Code repository
  • Issues
  • Wiki
  • Import history
  • Downloads (releases)

You can find it at [Wayback/Archive] Sourceforge.net: GitHub Project Importer with documentation at [Wayback/Archive] SourceForge Support / Documentation / GitHub Importer.

Via: [Wayback/Archive] sourceforge github importer – Google Search

–jeroen

Leave a comment

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