I like that SourceForge can also let people browse your code using Git. But, before I even set up the project on SourceForge, I had a GitHub repository for it. Now that I have created my SourceForge project, I had the option to use the Git tool. The problem is when I did that it made a new repository from scratch. I would like to use my existing GitHub repository with my SourceForge project, is this possible? As of now the SourceForge project has no files, so the button on the summary page, instead of a ‘Download’ button, is a ‘Browse Code’ button, but the button leads to an empty repository.
So I am wondering, is it possible to link my SourceForge project with my existing GitHub repository, or do I need to remove the ‘Code’ tool from my SourceForge project and just leave a link to my repository in the description?
2
AS the other posters pointed out, you can add more than one remote then simple push to each.
There is a better way, though, of creating merged remotes to where when you push to your remote, it actually pushes to two remotes. This answer has the detailed steps: https://stackoverflow.com/a/3195446/525703
Certainly, simply set up a new remote in your local Git repository, that points to your Sourceforge repository. Suppose you have named this repository sf
. Then simply:
git push sf master
will push the master
branch to the sf
remote. If you’ve set everything up correctly, a copy of your repository will be pushed into Sourceforge. You may then push any other, or all, branches/tags as desired.
0
You can’t, as far as I can tell.
Sourceforge has its own GIT Server and GitHub maintains it’s own.
-
You could manually push to each repo everytime you push.
git remote add origin SF_URL git push origin master git remote rm origin git remote add origin GITHUB_URL git push origin master
-
You could use some automatic syncing like this post suggests.
http://www.pragmatic-source.com/en/opensource/tips/automatic-synchronization-2-git-repositories
P.S. You should be able to automate this with Batch / Shell script. This way you can run one script and wait till it is done. This could get complicated when you have confliting changes and you have to merge though !!
3