Question

I'm working on a project that is hosted on Bitbucket. I would also like to have the same project on the office server connected to a local intranet so that when I commit on my system, I can push to both repositories (Bitbucket and my local server).

The whole setup should be users can collaborate on the local version if internet is unavailable and when it's available, they can update the online version.

Was it helpful?

Solution

You can just do this — it's built into the model of distributed version control. So

  • Make a clone of the Bitbucket repository and put it on your local server.
  • Configure hgweb on Apache or similar to publish the repositories from the local server.
  • Setup a cronjob (or other scheduled task) that periodically pulls from Bitbucket into the local server repository.

Your users can now pull from either repository. They should still merge and push manually to either repository, just like normal.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top