Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Best practices for creating a new branch while waiting for the PR to get merged

Edited

What to do while waiting for the PR to get merged?

I have worked on something called A. I raised the PR. PR is yet to be merged. I cannot sit idle. A new branch needs to be created. Future work has some dependency on A.

I can create a new branch from A or local master which is in sync with the remote master or I can continue working on A and pushing my changes to remote A.

1. If I create a new branch from A, I will have all the latest changes and I will be able to continue my work easily using those utilities and everything else available in the branch A.

But then, when the PR will be merged and the time comes when I will pull master, there will be some conflicts.

2. If I create a new branch from a local master which is in sync with the remote master, I will repeat many things that I have done in my PR to continue my work.

And again, when the PR will be merged and the time comes when I will pull master, there will be some conflicts.

3. If I continue doing my work in branch A, it will be ahead of remote master. When PR is about to merge, all my latest (pushed to remote A) changes will also be there in the PR as the PR would have been automatically updated.

4. After raising the PR, keep working on the same branch. When the PR gets merged, stash your changes. Pull and merge remote master. Create a new branch. Apply stash. The new branch will get changes. Is it so?

So, what should be the best practice here?

Also, what are the best practices for naming the branch?

5. If I create a branch name based on Jira Ticket, the same problem seems.

For example:

If PROJECT-105 is the branch name. I solve it, I raise the PR, next ticket requires similar changes.

If I commit push within the same branch, then the branch name will mislead, misguide...

If I create a new branch.... merry-go-round... the same problem as of question set 1.

0 answers

Suggest an answer

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

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

5,847 views 4 13
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