Git Workflows: The 4 Major Types
Git offers several types of workflows. Learn what they are and which type is best suited for your specific purpose.
Join the DZone community and get the full member experience.Join For Free
There are many workflows for Git:
- Centralized Workflow
- Feature Branch Workflow
- Gitflow Workflow
- Forking Workflow
In Centralized Workflow, the team develops projects in the exact same way as they do with Subversion. Git to power your development workflow presents a few advantages over SVN. First, it gives every developer their own local copy of the entire project. This isolated environment lets each developer work independently of all other changes to a project—they can add commits to their local repository and completely forget about upstream developments until it's convenient for them.
Feature Branch Workflow
Feature Branch Workflow is that all feature development should take place in a dedicated branch instead of the master branch. This encapsulation makes it easy for multiple developers to work on a particular feature without disturbing the main codebase. It also means the master branch will never contain broken code.
Gitflow Workflow provides a robust framework for managing larger projects. It assigns very specific roles to different branches and defines how and when they should interact. You also get to leverage all the benefits of the Feature Branch Workflow.
The Forking Workflow is fundamentally different than the other workflows. Instead of using a single server-side repository to act as the “central” codebase, it gives every developer a server-side repository. Developers push to their own server-side repositories, and only the project maintainer can push to the official repository. The result is a distributed workflow that provides a flexible way for large, organic teams (including untrusted third-parties) to collaborate securely. This also makes it an ideal workflow for open source projects.
Opinions expressed by DZone contributors are their own.