Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,310
Community Members
 
Community Events
168
Community Groups

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

Atlassian Community Events