I found this post and followed the steps but am getting inconsistent results. Usually the head of my qa branch. Is this because the PR is already merged?
Hello @Bryan_Forst ,
The source branch of a pull request might not exist anymore, so referencing it by name may not work. I'd suggest to use commit hashes instead.
For a merged pull request you should be able to see the merge commit hash in the UI:
Or, in the old PR experience:
Now, that merge commit has two parents: first one is the tip of the PR target branch just before merging, and the second one is the tip of the PR source branch at the same time.
What you can do is first checkout the merge commit and then reset to the second parent – this way you'll end up on the tip of the source branch of the PR. In my case it would be this:
git checkout 4833f0c
git reset HEAD^2
In my example this will bring me to c144df0. If I understand correctly, this is what you're trying to achieve.
Hope this helps. Let me know if you have any questions.
Hi everyone, We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...
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