How to see the original commits in PR after Squash Merge

neilclarke-edreamsodigeo
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!
February 12, 2021

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
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 16, 2021

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

neilclarke-edreamsodigeo
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!
March 8, 2021

Thanks for the detailed response!

Like Theodora Boudale likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events