Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

If a pull request is not yet closed can I create one more pull request for the same branch

If a pull request is created by me is  in Open status and I got some comments from my reviewer,

there is some other code that I need to get reviewed so can I create one more Pull request for this other code for the same branch.

How many Open Pull request can be there for a single branch

1 answer

1 accepted

0 votes
Answer accepted

Hello @T_Naveen_Kumar ,

There can be only one open PR from a given branch. However, you can create a new branch from the tip (branch is just a pointer to a commit) and work from there.

The only catch here is that when you create a PR from that new branch, you'd likely want to target it to the first branch rather than to the same branch as the first PR is targeted to. Otherwise the second PR will show changes from both first and second branches unless the first PR is merged. Does this make sense?

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Hello @Daniil Penkin ,

Firstly thanks for your response. I created a new branch but still, I was able to see the commits of previous pull request while creating a new pull request.

Did I chose the wrong point of creating a branch, I created at the same point where my previous repository was existing.

 

Regards,

Naveen

Hello @T_Naveen_Kumar ,

This is expected, since your second branch contains some or all commits of the first branch (depending on whether you have updated it or not after you branched off the second branch).

This is what I meant in this paragraph:

The only catch here is that when you create a PR from that new branch, you'd likely want to target it to the first branch rather than to the same branch as the first PR is targeted to. Otherwise the second PR will show changes from both first and second branches unless the first PR is merged. Does this make sense?

If you have a "stacked" pull requests, target it to the underlying branch, not to the final target branch. This will make the second PR only show new changes.  As soon as you merge the first PR, the second one will be automatically retarget to the correct branch.

Let me try to depict this:

Stacked PRs.png

A pull request on this picture is a coloured right-to-left arrow, and the rectangle of the same colour shows the commits involved in that PR. Now check the difference between PR 2 and PR 3: the former one contains all commits since the branch diverted from master (leftmost branch), while the latter only contains commits from the latest branch point as it is pointing not to master but to the first branch. As soon PR 1 is merged, PR 3 will be automatically retargeted to master.

Does this make sense?

Cheers,
Daniil

Like T_Naveen_Kumar likes this

@Daniil Penkin  Thanks for the detailed explanation. I got the point now

Like Daniil Penkin likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

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...

480 views 5 4
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