3

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?

  • 1
    @patches has the correct answer. You'd want to mark that as the right answer. – ShaggyInjun Feb 5 '13 at 3:38
  • I'm voting to close this question as off-topic because it is about using some online service. Such questions are on topic only if they cover how the service integrates into some development process – after all, this site is about Software Engineering. See our help center for details. Please read: Where does my tool question go? and Where does my git question go? – amon Oct 26 '17 at 17:45
7

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

2

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.

1

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 !!

  • Ok, I don't care about the downvoting as much, but you have left me in darkness here. I have shared what I know, would it not be fair to expect you to share what you agree / disagree, what you found useful and what is worthless in the above answer ? – ShaggyInjun Feb 5 '13 at 2:19
  • 3
    Just a note, you can have more than one remote set up at the same time, origin is just the default name set up after cloning. There's no need to change what origin points to every time you want to push somewhere else. I frequently have origin pointing to my repo on my own server and github pointing to the repo on Github. If I used Sourceforge, I would add another remote pointing to that repository. – Greg Hewgill Feb 5 '13 at 3:14
  • I was hoping somebody would tell me I could, didn't feel right that I have to remove the origin everytime. But, those are the commands I have used when I did a similar thing. Thankyou. – ShaggyInjun Feb 5 '13 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.