The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Fork Syncing Across Servers?

Tim Long
Contributor
February 22, 2014

I'm not sure what the underlying mechanism is for forking, so I'm not sure if this is a really dumb thing to want to do, but here's my use-case.

I want to 'fork' a project from another Git server (Codeplex, in this case) but I don't want my fork to be public, so I can't host my fork on Codeplex. I want to keep my fork in sync with the Codeplex development so that I automatically pick up all those changes into my main integration branch. What I want to do sounds a lot like automatic fork syncing, but that doesn't seem to work across servers.

Is there a way to achieve this? I.e. to have a 'private' fork in Stash of something on another server and to automatically keep in sync with it?

I suppose I can always pull and merge manually, but I was hoping to do a continuous integration using my build server.

Thanks,

Tim

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 22, 2014

Hi Tim,

The term "fork" is thrown around in different contexts, so it can make it a little confusing.

Unfortunately Stash's automatic fork syncing is very much tied in to the concept of local forks, and won't work in your case.

On the other hand using your continuous integration server is the perfect way to keep them in sync especially if they're both being modified. The problem with any fork is when you plan on making changes to both - at which point merges are inevitable and you will need some way of detecting a merge conflict and emailing the appropriate party. You could set up a "build" which pulls from Codeplex every X minutes (and/or possibly triggered by a webhook) and then pushes to Stash, detecting if the push was rejected due to changes and merging locally and trying again. If there are any conflicts then fail the build.

If you just need a read-only mirror in Stash then I might recommend just a simple mirror plugin and the associated feature request for Stash.

Question - are your changes from Stash going back in to Codeplex? Is it that the public/release version of your source? I ask because otherwise over time your repository is going to get further and further out-of-sync and the merge conflicts more frequent/nasty. This is where you have to be very careful.

I hope that helps in some way?

Charles

Tim Long
Contributor
March 10, 2014

Charles, that's very helpful, thanks. I hadn't thought of using the build server that way.

My changes are not going back to codeplex. I plan to keep a parallel development branch and occasionally merge in changes from the remote master. My changes will never go back to 'master' they will always stay on my parallel branch.

TAGS
AUG Leaders

Atlassian Community Events