Gosh, there are so many answered questions but i'm not sure about any of them.
Prerequisites:
- My projec开发者_Python百科t has main repository on github.
- My project has repository on sourceforge as well
Expected results:
- While developing i am pushing to my github repository (simple git push).
- Someone is cloning sourceforge repo (simple git clone).
- Someone is pushing his changes to sourceforge repo (simple git push).
- Both, sourceforge and github are still in sync.
Questions:
- Is it possible to configure something like this?
- I don't need backup. It would be good if sourceforge wouldn't have to fetch/send any data from/to github (so they wouldn't have to waste resources). So, generally - sourceforge should provide some kind of link to github repository, and this link should be automatically accessed at initial git clone .
Sorry, i'm adding a new question on this topic but i'm too confused what to use, if it will work, and most importantly - if it wont make a mess in my repo. I expect this would be something like remote tracking repo :)
There isn't really a good way to do this, no. Perhaps just provide a link to Github from your project's Sourceforge page instead?
The reason it can't be automated is that you have a potential to introduce conflicts that only a human can resolve. If you really want to keep them in sync a human will have to pull from both, resolve any conflicts, and then push to both. Alternately, you could make one of the repositories read-only, so other people can pull from it, but only one person can push, which eliminates the potential for conflict. However, unless you have a really good reason for keeping it duplicated, I would recommend closing one of the accounts.
精彩评论