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.
Cheers,
Daniil
Hi Daniil,
So far that seems to be working perfectly, thanks!
Bryan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.