No option to manually sync fork

We're investigating Bitbucket's forking process for a new project that we're working on.

We have a main repo and are creating forks for each individual user. These forks are not set to automatically sync changes.

When changes are made a pull request back to the main repo is created, and they are merged in.

While we can see that the other forks are behind by one or more commits, by going to Navigation > Branches and looking in the Behind/Ahead column. However, the number isn't a link, and the actions (accessible from the three dots) do not include any relevant options.

According to https://confluence.atlassian.com/bitbucketserver/keeping-forks-synchronized-776639961.html#Keepingforkssynchronized-Manualsynchronizationstrategies we should see the ability to manually sync from a couple different areas.

by going to the Settings > Fork syncing tab for the forked repository, or on either of the Source or Commits tabs for a repository

We do not.

We're running Atlassian Bitbucket v4.3.1. It looks like 4.4 was just released a week ago, and we'll look into upgrading, but based upon the changelog it doesn't look like this issue is covered.

What are we missing?

Thanks!

1 answer

1 accepted

Hi Michael,

The "Manual Syncing" option only comes up when the automatic fork syncing is enabled and if upstream and your fork have diverged, so that each has changes that are not in the other.

That being said, the manual syncing will only come up in case the automatic syncing encounters that situation.

To reproduce, say:

  • The auto-syncing is turned off
  • You change locally a certain line of a file in the master branch of your upstream and push this change to Stash
  •  You change locally the same line of the same file on the master branch of the fork and push the change to Stash
  •  You turn on the auto syncing and the manual option will come up

As described on the documentation, Bitbucket makes any fast-forward change where there is no need to merge work and there is no risk of losing changes. The manual syncing comes into picture to add this extra security layer.

Let us know if that clarifies it. Please also consider this further explanation of the Principal Dev in Bitbucket who designed and implemented this feature:

It [fork syncing] started out as a feature designed to scratch one of my itches, which was that I wanted to be able to use only my fork, without ever having to fetch from upstream manually. For that itch, automatic synchronization was the only thing I needed. I didn't want to have to browse to the Stash UI and click a button and then go back to the command line and fetch after synchronization completed. As a result, at the moment there is no purely manual option for synchronization. If I'm going to have to include a manual step, I think it's actually simpler to just do it all from the command line than to switch back and forth between browser and command line. I'm not aware of any plans to add manual synchronization via the Bitbucket UI. If you want to manually update your fork, you'll have to use the normal triangular workflow where you fetch from upstream and push it to your fork.

Best regards,
Thiago Bomfim
DevTools Support

 

Thanks Thiago. I'm afraid my co-worker knows the process a bit better than I, so I'll have to check with her to see if this behavior is something we wanted to stay away from, or if the clarification helps.

I will say that based upon https://confluence.atlassian.com/bitbucketserver/using-forks-in-bitbucket-server-776639958.html#UsingforksinBitbucketServer-Synchronizingwithupstream I wasn't expecting manual to be tied to automatic updating. "Once you fork a repository, your fork can be kept up-to-date with changes in the upstream repo either automatically by Bitbucket Server or you can synchronize manually." makes me believe that if the automatic option isn't selected, manual options would be visible. However, at the moment, I'm afraid I can't make any recommendations on how the language might be tweaked so that it would align with what you've said above.

Thanks! 

Hi James, not a problem! I am glad we've been able to clarify it and we do have a documentation request open to change that. I will leave the language thing to our Tech Writers smile

Enjoy the feature!

The misleading information at https://confluence.atlassian.com/bitbucketserver/using-forks-in-bitbucket-server-776639958.html#UsingforksinBitbucketServer-Synchronizingwithupstream is still there.

Also, this still doesn't provide a solution to the problem. If our fork is not up to date and we need to update it we should be able to force an update instead of waiting for auto sync to happen.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

678 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot