Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

"X commits behind master" warning when having squashed commits

Alparslan
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!
June 17, 2025

Hi,

Bitbucket warns that my pull request is behind X commits "master". At my local environment I squashed X amount of commits (git rebase -i) which were already in master branch. With git log I see only squashed commit and previous X amount of commits have disappeared at git log.

When I make a pull request, bitbucket shows the new squashed commit correctly. But there is the behind X commits "master" warning. When I click "sync now" button next to the warning, the pull request shows there are no changes.

Can I proceed to merge the pull request although there is warning? No other people have pushed to the repository. When my workmate approves the pull request, it is possible to merge. If I can't proceed to merge, is there any workarounds?

 

 

1 answer

0 votes
Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2025

Hi @Alparslan

Refreshing the pull request page after you push might make the message go away.

Can I proceed to merge the pull request although there is warning?

Yes, but it depends on your branching strategy. Also if you merge using rebase, from the steps you described above, is likely what you are after.

If I can't proceed to merge, is there any workarounds?

If you can't proceed it will likely be because there is a conflict - someone changed something in "master" that you changed in your pull request. So you will need to resolve the conflict manually.

We provide Flowie, a Bitbucket app, that helps enforcing your branching strategy. In your case you could configure it to always merge using rebase, so you won't accidentally merge without using rebase. It also has additional merge checks that you can enable to ensure the right workflow.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events