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