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!
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:
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
We have an improvement request for this: https://jira.atlassian.com/browse/BSERV-7166
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Enjoy the feature!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For those landing here now, this still does not work. You cannot create a pull request from where you forked from (`upstream/master`) to where you forked to (`origin/branch`) via BitBucket interface. It seems to only be possible from the command line. This is fine, but now we have to enable 'Write to master' rather than limit writing to pull-requests.
Anyways, until it is implemented/fixed, here is how to do it locally:
git remote add upstream ssh://myrepo.git
git pull upstream master
git push
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.