Missed Team ’24? Catch up on announcements here.

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

Can I disable "Sync Now" on Branches/Pull Requests in Bitbucket Cloud?

Ben Tillman February 27, 2018

While some find the "Sync Now" feature useful for keeping a pull request or a branch up to date, we want to have our developers learn the ins and outs of Git by having to do this themselves manually, so I wanted to see if there was any thought on having this feature be controlled by an option per repository?

In addition to wanting our developers to learn more of the ins and outs of Git by not having this, we have also run into issues where it is erroneously clicked on when a user views a feature branch and Bitbucket shows the incorrect destination branch (when we have two mainline branches), so the feature branch ends up getting synced with the wrong destination branch.

3 answers

5 votes
Alex Anderson August 3, 2020

"Sync now" is also unhelpful for teams/repos using squash/rebase workflows, as it makes rebasing onto the target branch more complicated.

It would be very helpful to:

* have an option to disable "Sync Now" or
* have an option to change its behaviour to rebase, or
* change its behaviour to rebase if the repo's Merge Strategy is set to "squash"

Alex Anderson August 3, 2020

(JIRA issue for changing Sync Now to rebase: https://jira.atlassian.com/browse/BCLOUD-6202)

Like # people like this
Eric Berndt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 18, 2024

i too vote for the "disable" or "rebase" options

1 vote
Lenin Raj
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 13, 2020

I believe the Sync Now button should correctly sync from the target branch of the PR

Ben Tillman January 14, 2020

You are correct that the Sync Now button will sync from the target branch of the PR, but if the user were to pick the wrong target branch and then click Sync Now, it would then become out of sync. I am simply looking for a way to disable the Sync Now button per repository since we are trying to have people on our team learn the ins and outs of Git Flow, which would mean keeping the branch in sync not via the Sync Now button in the Bitbucket UI.

Like # people like this
Lenin Raj
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 14, 2020

Im afraid this option cannot be disable. However, the pull request can be edited to fix the target branch if it was created incorrectly.

Rob Benton August 9, 2022

Can this not be prevented using some sort of branch restriction? We use a gitflow model and we don't want people accidentally hitting "sync now" to merge dev into master which would ruin our production code.

0 votes
Jim Priest April 28, 2022

I'm running into another issue with the Sync now button.  

I have a pipeline setup to run on commits to feature/*

  1. I push my feature branch up - the pipeline fires and my feature branch is deployed to QA
  2. I create a pull request to merge my feature branch into develop
  3. Within the pull request Bitbucket informs me my branch is behind and I can sync now 
  4. If I click Sync Now it merged Develop > Feature - which fires my Pipeline again!


Ben Tillman April 29, 2022

I believe this is by design. Since clicking Sync Now will make a merge commit from develop into your feature branch of all the latest changes on develop not contained in your feature branch. This commit is then what is triggering your pipeline.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events