kb:bestpractices:scc:gitflow-workflow
11 Gitflow Workflow
gitflow is a branching model for git created by Vincent Driessen. It forms an elegant mental model that is easy to comprehend and allows team members to develop a shared understanding of branching and releasing processes.
Detailed information can be found on A successful git branching model.
The Git Tower team wrote another detailed description on how to use gitflow with a GUI tool.
Basic usage and effect of git-flow operations on the command line:
https://danielkummer.github.io/git-flow-cheatsheet/
In a nutshell:
- use different branches for different purposes
master
holds only releases (and bugfixes)develop
holds the latest version under development- only tested features are merged into develop
all features are developed in single, separate branches calledfeature/xxx
- these feature branches are merged back into
develop
after the feature is finished and tested
Guidelines for gitflow
- Create meaningful feature branch names and add your name (or initials) to the branch for easy identification - see branching rules for details
- Each developer should work on no more than one feature branch at any time
- Keep your feature branch synced with develop (as often as possible) to avoid drifting from main code (
git pull develop
)- i.e. merge develop back into your feature branch
Close your feature branches as soon as the work is finished, not after days when some details are already forgotten. This helps to keep history more readable.Merge thedevelop
branch into your feature branch before finishing it. That way, you can solve any conflicts in your local workspace without breaking anything for the rest of the team.
kb/bestpractices/scc/gitflow-workflow.txt · Last modified: 2020/09/30 15:28 by joerg.hampel