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

How to see the original commits in PR after Squash Merge

Hi all,

I am investigating using the squash merge strategy for PRs

Everything is working fine apart from one thing:

The list of commits is updated after I merged the PR; and it only contains the squashed commit. I lose all reference to the original commits.

In the GitHub UI the original commits are still accessible for future reference.

Am I missing something in the Bitbucket UI? or is this feature missing from Bitbucket??

 

Example,


PR commit list pre squash merge:
Screenshot from 2021-02-12 13-54-26.png

PR commit list post squash merge:
Screenshot from 2021-02-12 13-55-27.png

1 answer

1 accepted

0 votes
Answer accepted

Hi @neilclarke-edreamsodigeo ,

Based on your screenshots, I believe you are using Bitbucket Cloud (instead of server)?

This behavior is by design when you do a squash merge. The only way to access the original commits would be by not deleting the source branch when you merge, and then view them in the Commits page of the repo (but not in the PR).

We have an open feature request to show the commits of the source branch instead, as this has been requested by other users:

I would like to note here that in Bitbucket Cloud, PRs are not saved as refs in the repo. If the source branch of a PR is deleted after merging, its commits become dangling commits (not associated with any reference). They will still exist in the repo after the source branch deletion, but will most likely get removed once a git gc runs for the repo.

So, feature request BCLOUD-20598 may be dependant on the implementation of https://jira.atlassian.com/browse/BCLOUD-5814 (having refs for PRs in the repo).

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Thanks for the detailed response!

Like Theodora Boudale likes this

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,751 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