Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's your ideal branch architecture within git for web applications?

We're a small team of developers and building a web application. We're currently having a live, testing and several development environments.

What branch architecture would you suggest, so ideally each developer can work on his feature(s), these can be tested and deployed without tangenting other developers/features?

Currently, each developer has its own development branch and rebases into the testing branch. As soon as a feature is approved, the developer rebases his changes into the master.

This works as long as the features are tested immediately. However, if one developer is working on the next feature while the feature before is still tested, we need to handle things manually.

Thanks for opinions.

like image 610
Matthias Dietrich Avatar asked Jul 06 '11 12:07

Matthias Dietrich


People also ask

What is the best branching strategy in Git?

Build your strategy from these three concepts: Use feature branches for all new features and bug fixes. Merge feature branches into the main branch using pull requests. Keep a high quality, up-to-date main branch.

What architecture is used in Git?

Git uses a three-tree architecture It still has the repository and the working copy, but in between is another tree, which is the staging index.

Which one is the best branching Git workflow to follow?

Git Flow. The Git Flow is the most known workflow on this list. It was created by Vincent Driessen in 2010 and it is based in two main branches with infinite lifetime: master — this branch contains production code.


1 Answers

It has been a while that I follow this useful guidelines described by Vincent Driessen in his article A successful Git branching model.

You can take a look there and you will see how he describes the branches management and avoid rebases

like image 101
Felipe Sabino Avatar answered Oct 11 '22 14:10

Felipe Sabino