Published on Sat Feb 11 2023 09:20:00 GMT+0000 (Coordinated Universal Time) by Valerio Como
Git flow
A branching model workflow for Git
Want an AI-generated TL;DR? Open this page in Google Chrome to try the built-in AI summarization feature.
Are you a coding nerd? Check out this blog post;
A lot of time has passed since the last post was published. I decided to write about a tool that I have used a lot over the past few years. Not just a tool, a workflow model for Git. It may not be the most trending tool in 2023 but it has its usefulness in some contexts of use.
Context
A few years ago, I was working on a project and the customer, for the first time, was introducing Git into their development toolchain.
I understood their needs because, like them, I had felt the same need some time before.
I jumped at the chance and I proposed the adoption of Git Flow.
Follow the flow
Git Flow is a branching model for Git, a popular version control system. It was first published by Vincent Driessen in 2010 as a series of bash scripts, but has since been implemented as a command-line tool and integrated into various Git clients. The model is designed to handle both small and large projects, and it provides a clear and efficient workflow for developers.
The Git Flow model consists of two main branches: the develop branch and the master branch. The develop branch is where all the development work is done, while the master branch contains the official release versions of the software.
There are also several supporting branches in the Git Flow model:
- Feature branches: These branches are created from develop and are used for working on new features. Once a feature is complete, it is merged back into develop.
- Release branches: These branches are created from develop and are used for preparing a new release. They are used to stabilize the codebase, fix any bugs, and make any last-minute changes before the release. Once the release is ready, it is merged into both the master and develop branches.
- Hotfix branches: These branches are created from master and are used for quickly fixing critical bugs in a release. They are then merged back into master and develop .
Git Flow provides clear guidelines for how to work on different types of changes and helps to ensure that the master branch always contains stable, tested code.
It is important to note that Git Flow is just one of many branching models that can be used with Git, and it may not be the best fit for every project or team. It’s a great starting point for teams new to Git, but as the team and project grow, it’s important to re-evaluate and see if it still fits the team’s needs.
References
Here some useful links:
- https://nvie.com/posts/a-successful-git-branching-model/
- https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
- https://danielkummer.github.io/git-flow-cheatsheet/
Written by Valerio Como
← Back to blog