A modern, lightweight .NET CLI tool for managing Git branches using the Gitflow branching model — structured, predictable, and production-ready.
// Why Gitflow
Gitflow gives your team a clear, consistent branching strategy so that features, releases, and hotfixes never step on each other.
Every new feature lives on its own branch, keeping develop
stable until work is complete and reviewed.
Release branches let you freeze and polish a release without blocking ongoing feature development.
Branch off main directly for emergency fixes and merge
back to both main and develop automatically.
A shared, documented workflow means every contributor knows exactly where a change belongs — less confusion, fewer conflicts.
Finishing a release or hotfix creates a proper Git tag so your release history is always traceable.
Support branches let you maintain older versions alongside active development without merge chaos.
// Merge Flows
Each branch type follows a well-defined merge strategy. Select a flow below to visualise the exact sequence of branches and merges.
A feature branch is created from develop, work is done in isolation,
then merged back to develop when complete.
%%{init: {'theme': 'dark', 'themeVariables': {'git0': '#00f5ff', 'git1': '#39ff14', 'gitBranchLabel0': '#000', 'gitBranchLabel1': '#000'}, 'gitGraph': {'mainBranchName': 'develop'}}}%%
gitGraph
commit id: "Setup project"
branch feature/my-feature
checkout feature/my-feature
commit id: "feat: add logic"
commit id: "feat: add tests"
checkout develop
merge feature/my-feature id: "Merge feature"
commit id: "Continue develop"
A bugfix branch is created from develop, the bug is fixed,
then merged back to develop.
%%{init: {'theme': 'dark', 'themeVariables': {'git0': '#00f5ff', 'git1': '#ff2d78', 'gitBranchLabel0': '#000', 'gitBranchLabel1': '#000'}, 'gitGraph': {'mainBranchName': 'develop'}}}%%
gitGraph
commit id: "Active development"
branch bugfix/fix-null-check
checkout bugfix/fix-null-check
commit id: "fix: null check"
checkout develop
merge bugfix/fix-null-check id: "Merge bugfix"
commit id: "Continue develop"
A release branch is cut from develop, stabilised, then merged
to both main (with a version tag) and back to
develop.
%%{init: {'theme': 'dark', 'themeVariables': {'git0': '#00f5ff', 'git1': '#39ff14', 'git2': '#bc13fe', 'gitBranchLabel0': '#000', 'gitBranchLabel1': '#000', 'gitBranchLabel2': '#000'}, 'gitGraph': {'mainBranchName': 'develop'}}}%%
gitGraph
commit id: "Feature A"
commit id: "Feature B"
branch release/1.0.0
checkout release/1.0.0
commit id: "Bump version"
commit id: "Release notes"
checkout develop
branch main
merge release/1.0.0 id: "Release 1.0.0" tag: "v1.0.0"
checkout develop
merge release/1.0.0 id: "Back-merge"
commit id: "Next cycle"
A hotfix branch is created directly from main to address a
critical production issue, then merged to both main
(with a patch tag) and back to develop.
%%{init: {'theme': 'dark', 'themeVariables': {'git0': '#00f5ff', 'git1': '#39ff14', 'git2': '#ff2d78', 'gitBranchLabel0': '#000', 'gitBranchLabel1': '#000', 'gitBranchLabel2': '#000'}}}%%
gitGraph
commit id: "Initial commit"
branch develop
checkout develop
commit id: "Development"
checkout main
commit id: "v1.0.0" tag: "v1.0.0"
branch hotfix/1.0.1
checkout hotfix/1.0.1
commit id: "fix: critical bug"
checkout main
merge hotfix/1.0.1 id: "Hotfix 1.0.1" tag: "v1.0.1"
checkout develop
merge hotfix/1.0.1 id: "Back-merge"
// Installation
Karl's Gitflow is available as a .NET global tool, via Homebrew on macOS, and as a Windows installer — choose the method that suits your platform.
Download from dotnet.microsoft.com if you haven't already.
Run the single install command shown on the right.
Navigate to your repo and run git flow init to set up branches.
Create your first isolated feature branch and get to work!
# Install as a global .NET tool dotnet tool install -g Karls.Gitflow.Tool # Initialize Gitflow in your repo git flow init -d # Confirm it's working git flow --version
If you don't have Homebrew, install it from brew.sh.
Run the install command shown on the right to tap and install the formula.
Navigate to your repo and run git flow init to set up branches.
Create your first isolated feature branch and get to work!
# Install via Homebrew (macOS) brew install karl-sjogren/tap/karls-gitflow # Initialize Gitflow in your repo git flow init -d # Confirm it's working git flow --version
Get the .msi installer from the latest release on GitHub.
Double-click the .msi file and follow the setup wizard. The tool is added to your PATH automatically.
Open a terminal, navigate to your repo, and run git flow init to set up branches.
Create your first isolated feature branch and get to work!
# After running the MSI installer, # open a new terminal and verify the install: git flow --version # Initialize Gitflow in your repo git flow init -d # Start your first feature git flow feature start my-feature
// Usage
Karl's Gitflow wraps common Gitflow operations into intuitive sub-commands. Select a branch type below to see its commands.
# Interactive setup — prompts for branch names git flow init # Use sensible defaults (main / develop) git flow init -d # Specify branch names explicitly git flow init --main main --develop develop
# List all feature branches git flow feature list # Start a new feature branch git flow feature start my-feature # Finish a feature (merges to develop) git flow feature finish my-feature # Auto-detect branch name when already on it git flow feature finish # Publish feature to remote git flow feature publish my-feature # Track a remote feature branch git flow feature track my-feature # Delete a feature branch git flow feature delete my-feature
# List all bugfix branches git flow bugfix list # Start a new bugfix branch git flow bugfix start fix-null-check # Finish a bugfix (merges to develop) git flow bugfix finish fix-null-check # Publish bugfix to remote git flow bugfix publish fix-null-check # Track a remote bugfix branch git flow bugfix track fix-null-check # Delete a bugfix branch git flow bugfix delete fix-null-check
# Start a release branch git flow release start 1.0.0 # Finish a release (merges to main + develop, tags) git flow release finish 1.0.0 -m "Release 1.0.0" # Skip the tag git flow release finish 1.0.0 --notag # Publish release to remote git flow release publish 1.0.0 # Track a remote release branch git flow release track 1.0.0
# Start a hotfix from main git flow hotfix start 1.0.1 # Finish a hotfix (merges to main + develop, tags) git flow hotfix finish 1.0.1 -m "Hotfix 1.0.1" # Skip back-merge to develop git flow hotfix finish 1.0.1 --nobackmerge # Track a remote hotfix branch git flow hotfix track 1.0.1
# List current configuration git flow config list # Override feature branch prefix git flow config set feature feat/ # Override release branch prefix git flow config set release release/
| Branch Type | list | start | finish | publish | track | delete |
|---|---|---|---|---|---|---|
| Feature | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| Bugfix | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| Release | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| Hotfix | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| Support | ✔ | ✔ | — | ✔ | ✔ | ✔ |
// Finish Options
Append these flags to any finish command to control exactly what
happens during the merge.
-k / --keepKeep the branch alive after finishing instead of deleting it.
-F / --fetchFetch the latest from origin before performing the merge.
-p / --pushPush the target branch to origin after the merge.
-S / --squashSquash all branch commits into a single merge commit.
-m / --messageCustom tag message for release and hotfix branches.
-n / --notagSkip creating a Git tag (release & hotfix only).
-b / --nobackmergeSkip merging back to develop (release & hotfix only).