Skip to content

git_flow implements the Gitflow branching model directly — no git-flow CLI binary required.

Gitflow defines a strict branching structure with dedicated branches for features, releases, hotfixes, and ongoing support.

git_flow

ParameterTypeRequiredDefaultDescription
repo_pathstring*Absolute path to the repository
actionstring*Gitflow operation (see below)
namestringBranch name for the feature, release, hotfix, or support
main_branchstring"main"Production branch name (used during init)
develop_branchstring"develop"Integration branch name (used during init)
remotestring"origin"Remote for publish operations
tagbooleantrueCreate a tag when finishing a release or hotfix
tag_messagestringAnnotation for the tag created on finish
delete_branchbooleantrueDelete the branch after finishing
response_format"markdown" | "json""markdown"Output format

Actions

ActionDescription
initInitialize Gitflow in the repository (creates develop if it does not exist)
feature-startCreate a new feature branch from develop
feature-finishMerge a feature branch back into develop
feature-publishPush a feature branch to the remote
feature-listList all open feature branches
release-startCreate a release branch from develop
release-finishMerge release into main and develop, create a tag
release-publishPush a release branch to the remote
release-listList all open release branches
hotfix-startCreate a hotfix branch from main
hotfix-finishMerge hotfix into main and develop, create a tag
hotfix-listList all open hotfix branches
support-startCreate a long-term support branch from a tag
support-listList all open support branches

Typical Workflow

1. Initialize:

json
{ "tool": "git_flow", "params": { "repo_path": "/home/user/myproject", "action": "init" } }

2. Start a feature:

json
{
  "tool": "git_flow",
  "params": { "repo_path": "/home/user/myproject", "action": "feature-start", "name": "user-auth" }
}

This creates feature/user-auth from develop.

3. Publish the feature (optional):

json
{
  "tool": "git_flow",
  "params": { "repo_path": "/home/user/myproject", "action": "feature-publish", "name": "user-auth" }
}

4. Finish the feature:

json
{
  "tool": "git_flow",
  "params": { "repo_path": "/home/user/myproject", "action": "feature-finish", "name": "user-auth" }
}

Merges feature/user-auth into develop and deletes the branch.

5. Start a release:

json
{
  "tool": "git_flow",
  "params": { "repo_path": "/home/user/myproject", "action": "release-start", "name": "1.2.0" }
}

6. Finish the release:

json
{
  "tool": "git_flow",
  "params": {
    "repo_path": "/home/user/myproject",
    "action": "release-finish",
    "name": "1.2.0",
    "tag_message": "Release 1.2.0"
  }
}

Merges into main and develop, creates tag v1.2.0.

7. Emergency hotfix:

json
{
  "tool": "git_flow",
  "params": { "repo_path": "/home/user/myproject", "action": "hotfix-start", "name": "1.2.1" }
}
json
{
  "tool": "git_flow",
  "params": { "repo_path": "/home/user/myproject", "action": "hotfix-finish", "name": "1.2.1" }
}

Released under the MIT License.