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
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.