GitFlow is a .NET-based command-line tool designed to simplify and automate the implementation of the GitFlow branching model. This model provides a structured approach for managing feature development, releases, hotfixes, and bug fixes in Git repositories.
Key Features:
Branch Management: Supports feature, bugfix, release, and hotfix branches with clear workflows for starting, publishing, updating, finishing, and deleting branches.
Configuration Customization: Allows users to define branch names, prefixes, merge strategies, and version tag conventions to align with team preferences.
Git Integration: Operates seamlessly within existing Git repositories, enabling teams to adopt the GitFlow model without disrupting their workflow.
Audience & Benefit:
Ideal for developers and development teams using Git who seek a standardized approach to branch management. By implementing the GitFlow branching model, teams can reduce merge conflicts, maintain a clear commit history, and streamline collaboration across projects.
GitFlow can be installed via winget, making it easy to integrate into your development environment.
Development (develop): Integration branch for features
Feature (feature/*): New features for upcoming releases
Bugfix (bugfix/*): Bug fixes for upcoming releases
Release (release/*): Preparation for production release
Hotfix (hotfix/*): Emergency fixes for production
Workflow
Features/Bugfixes: Develop → Feature → Develop
Releases: Develop → Release → Production + Development (with tag)
Hotfixes: Production → Hotfix → Production + Development (with tag)
Configuration
GitFlow requires local configuration in each repository. Configuration is stored in git config.
Local Configuration
Local configuration is stored in .git/config:
[gitflow]
production = main
development = develop
prefix.feature = feature/
prefix.release = release/
prefix.hotfix = hotfix/
prefix.bugfix = bugfix/
prefix.version = v
merge.strategy = --no-ff
Important: All GitFlow commands (start, finish, publish, etc.) require local configuration. Run gitflow config init first.
Global Template
Global template is stored in ~/.gitconfig and used as defaults during gitflow config init:
gitflow config template # Create global template
The template simplifies initialization across multiple repositories by providing default values.
Configuration Priority
Local configuration (.git/config) - used by all GitFlow commands
Global template (~/.gitconfig) - used as defaults during initialization
Hooks
GitFlow supports C# hooks that can be executed at various stages of the workflow. Hooks are optional scripts that automate custom actions during GitFlow operations.
Available Hooks
Release Hooks
gitflow-release-start-pre.cs - Executed BEFORE creating a release branch
gitflow-release-start-post.cs - Executed AFTER creating a release branch
Hotfix Hooks
gitflow-hotfix-start-pre.cs - Executed BEFORE creating a hotfix branch
gitflow-hotfix-start-post.cs - Executed AFTER creating a hotfix branch