What is Git-Flow?
Git-Flow is a branching strategy model that is very used in large projects where several developers are working at the same time. It is also an extension for git to support this new workflow.
How does Git-Flow organize the work?
Git-Flow has two main branches to organize the flow.
- Master: The main code that is in production.
- Develop: The branch with the “work in progress”, where the next version of the program is being cooked.
Apart from them, there are several auxiliary branches which are of one of the following types:
- Feature: Branches for new features. They are always based on develop.
- Release: When we reach an epic and have enough features and code in develop, we create a release branch out of it to start testing, usually in a pre-production environment. If testing passes, we merge this to master with a new tag. If there is any code in this branch from bugfixes that is not in develop, the branch is also merged into develop when merged into master.
- Bugfix: They can be based on develop or in a release branch, depending on the stage the bug has been found.
- Hotfix: They are the same as bugfixes, but for bugs found in production. They are based on master, and when merged, they are merged either to master and develop.
- Support: Experimental branches to support previous releases. More info in Git-Flow FAQs.