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

Is it good practice to create branches per task?

DivyangD September 14, 2018

We're working in team with 5 to 6 people. All we are doing is creating a new branch on every new task and later merge it with development branch. Sometimes it's hard to mange locally even! I would like to know are we following best practices? or creating a branch per user is a good approach?

 

4 answers

2 votes
Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 14, 2018

Your current workflow sounds good. A branch per user might not be the best approach given you may collaborate with other team members on a feature; that could get complicated using a branch-per-user workflow.

You may find that this article about Feature Branch Workflow validates your current practices.

https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow

Pedro Pereira September 14, 2018

I would vow for the feature branch workflow. Has worked pretty well for us

0 votes
suresh July 26, 2019

Even I am looking for this type of approach (one branch for feature). But the only question I have is : if there are 100 features then will I be creating 100 branches (not at once but gradually)? Can you please help me out.

Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 29, 2019

100 branches is no problem. As you merge your feature branches into your project, you can choose to Close source branch.

https://confluence.atlassian.com/bitbucket/merge-a-pull-request-945541513.html#Mergeapullrequest-Mergeapullrequest

Like Terje Sandstrom likes this
0 votes
actionscripted September 15, 2018

Per-task is generally a good idea along the same lines as a feature branch workflow.

If it’s too cumbersome, maybe do branches by story?

What about your current process seems troublesome?

0 votes
Yogesh Mude
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 14, 2018

HI @DivyangD

I would say..branching mechanism is one of the best ways to use GIT.

Using branching the developers can work independently on their local branch, once done they can push the code to the remote repo so there is no dependency and while merging also you can merge a single branch to master/dev branch.

Multiple teams can work on a single repository at a same time.

DivyangD September 14, 2018

Hi @Yogesh Mude, thanks for prompt reply! Yes agree with you, but what if we create branches per user? for instance, we have 5 team members in a team, I would create 5 branches and commit their code into it, once they done with one task, they would create a pull request to the development branch. Is there bad in this approach? 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events