Forums

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

Can multiple PRs have same merge_hash ?

Arjun Singh
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!
November 10, 2025

In same repository, I'm getting multiple PRs having same merge_hash field is it possible? I want to map PRs with commits but here I'm facing issue as I can't map PRs and Commits one to one.

like 

"merge_commit": {
"hash": "c444b08cb3cc",
"type": "commit"
},

2 answers

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 13, 2025

Hi @Arjun Singh 

Yes, it is possible and expected in certain scenarios:

1. Automatic Merging of Related PRs

When you have multiple PRs that are based on the same commit history (for example, one branch is created from another, and both have open PRs targeting the same destination branch), merging one PR can cause Bitbucket to automatically merge the other(s) if their changes are already included.

Example scenario:

  • You create branch1 from main and open PR1 (branch1main).

  • You create branch2 from branch1 and open PR2 (branch2main).

  • PR2 contains all the commits from PR1 plus additional ones.

  • When you merge PR2, Bitbucket sees that all the changes from PR1 are now in main, so it automatically marks PR1 as merged.

  • Both PR1 and PR2 will have the same merge_commit.hash (the commit created by merging PR2).

2. Rebasing or Force Pushes

If a branch is rebased or force-pushed such that its changes are already present in the target branch (e.g., via another PR), Bitbucket will mark the PR as merged, and the merge commit may be the same as another PR.

3. Squash Merges and Fast-Forward Merges

Depending on the merge strategy (merge commit, squash, fast-forward), the resulting commit history can cause multiple PRs to reference the same merge commit if their changes are identical or already present.'

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

0 votes
Aron Gombas _Midori_
Community Champion
November 12, 2025

I assume that the JSON snippet you pasted is part of a pull request's full JSON returned by the Bitbucket Cloud REST API.

Unfortunately, the meaning of the "merge_commit" field is not documented. But I assume that it identifies the commit created by merging the pull request. You can verify it by viewing this field on pending pull requests (where it should be missing or empty).

If my assumption is correct, then I would think that every pull request will create is own merge commit, and as commit hash is unique, the merge commit hash should be unique

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events