Introducing GitFlow
What is GitFlow?
GitFlow is a branching model for Git, created by Vincent Driessen.
Key Benefits
Parallel Development
One of the great things about GitFlow is that it makes parallel devleopment very easy, by isolating new development from finished work. New development (such as features and non-emergency bug fixes) is done in feature branches and is only merged back into the development branch after going through extensive unit/regressional testing + review through the pull request.
Another great thing about GitFlow is that if you are asked to switch from one task to another, all you need to do is commit your changes and create a new branch for your new task. When that task is done, just checkout your original feature branch and you can continue where you left off.
Collaboration
Feature branches also make it easier for developers to collaborate on the same feature, because each feature branch is essentially a sandbox where you isolate + test the changes that are only necessary to get a new feature working, making it crystal clear to follow what each collaborator is working on.
Release Staging Area
As new development is completed, it gets merged back into the development branch, which is a staging area for all completed features that haven’t yet been released. So when the next release is branched off of development, it will automatically contain all of the new tasks that have been finished.
How it Works
ALL OF OUR DIAGRAMS READ FROM TOP TO BOTTOM
High Overview of Our Process
Feature branches
Our development branch is considered to be the main branch, where features are branched off of development and merged back into development.
Merging to Master Branch
The master and development branches exist parallel to one another. We consider the development branch to be the main branch where the source code always reflects a state with the latest delivered development changes. Once the development branch is ready to merge back to the master, we create a release branch (not supported in our document). Our version can either cherry-pick the developments we want into the master or revert the changes and merge to the master and re-revert the changes (not supported in the document).