Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


Repository Upgrade FAQ

Cory Johns

How do I migrate commits made to my old repository after the upgrade?

If your old repository was not set read-only and there were commits made to it after your project were upgraded, you will need to bring those commits over to the new repository. With git and Mercurial, it is relatively straightforward to push the commits to the new repository. Just pull all the commits from the old repo, change your origin / default path (see below), and push the commits to the new repo.

For SVN, it is more complicated. If there are no new commits on the new repository, you can just use the Import Repo tool on the Admin page of the project to reimport the repository. If the repos are diverged, you will need to merge the changes into the new repo:

svn merge -r<last-common-revision>:HEAD <old-repo-url>

How do I change git to point to the new repo?

If you have a newer version of git, you can use set-url:

git remote set-url origin <new-repo-url>

If your version of git doesn't support set-url, you'll need to remove and re-add the origin remote:

git remote rm origin
git remote add origin <new-repo-url>

You can also just edit the .git/config file and change the URL there.

How do I change Mercurial to point to the new repo?

Just edit the hgrc file in .hg/hgrc and change the URL for default in the [paths] section.

How do I change SVN to point to the new repo?

Newer versions of SVN can use the relocate command:

svn relocate <new-repo-url>

Older versions will need to use switch instead:

svn switch --relocate <old-repo-url> <new-repo-url>

You can get the old repo URL from the info command:

svn info

Note that the URL paths need to match, that is, if your old URL ends in /trunk, the new one must as well, and vice-versa. If not, you may get the error:

svn: Can't find entry

I need more help!

Contact SourceForge Support and we'll do what we can to help.

1 2 > >> (Page 1 of 2)
1 2 > >> (Page 1 of 2)