It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Fork Syncing Across Servers?

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.



1 answer

1 accepted

0 votes
Answer accepted

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, 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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

Contest: Share your custom Bitbucket Pipe and win

Announced in this blog, this holiday season we’re celebrating all things CI/CD and between now and the end of 2019 we’ll be showcasing content, use cases, feature announcements and more. One featur...

1,093 views 4 4
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you