Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

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

2 votes
Answer accepted
ThiagoBomfim Atlassian Team Mar 09, 2016

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

 

ThiagoBomfim Atlassian Team Mar 09, 2016

We have an improvement request for this: https://jira.atlassian.com/browse/BSERV-7166

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! 

ThiagoBomfim Atlassian Team Mar 10, 2016

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.

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

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,719 views 10 16
Read article

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