I have been tasked with configuring the following setup.
Currently, we have an internal canonical repo for an opensource project. We have a post-receive hook that pushes any updates to a remote repository exposed to the public.
Joe Public can pull from the public repo.
No one pushes to the remote repo except the post-receive hook
We have quite a few users working on the code internally and I really don't want to mess with the workflow that they have already working.
internal users check the code out from the internal canonical repo and commit to the same.
external devs have to submit patches and then an internal user will commit for them (after review).
At this point we want to start allowing some external devs to have commit access to the repository.
This means making the remote repo canonical.
It also means changing the workflow for users. Unless the collective here can come up with something I am missing with regard to git.
Quick diagram of the current workflow.
INTERNAL USER.
clone from internal repo. -> monkey with code -> push to internal repo -> post-receive hook pushed to remote repo.
EXTERNAL USER.
clone from external repo. -> monkey with code -> submit patch via mailing list -> Internal User pushes code to internal repo -> post-receive hook pushed to remote repo.
NEW WORKFLOW IDEALLY!!
INTERNAL USER.
clone from internal repo. -> before clone is provided pre-receive hook makes certain we have an updated mirror from the remote -> monkey with code -> push to internal repo -> pre-receive hook proxies the commit to the remote repo and syncs the 2.
EXTERNAL USER.
clone from remote repo. -> monkey with code -> push to remote repo.
This is kind of like a multi master setup. Where you can push code to either repo and pull code from either repo.
Some other caveats.
The internal repo can push and pull from the remote repo. The remote repo cannot reach the internal repo.
What do you think?