Skip to content

Reference: Configuration

Konstantin edited this page Dec 15, 2025 · 24 revisions

Reference: Configuration

Team Configuration File (.gitflow) - LBEM Edition

The LBEM Edition supports a .gitflow configuration file in the repository root. This file is automatically loaded during git flow init and allows teams to share git-flow settings.

Creating a .gitflow file

Export your current configuration:

git flow config export

Or create manually in your repository root:

[branch]
    master = main
    develop = develop

[prefix]
    feature = feature/
    bugfix = bugfix/
    release = release/
    hotfix = hotfix/
    support = support/
    versiontag = v

[finish]
    mode = propose

[sync]
    strategy = rebase

[propose]
    open = true

.gitflow sections

Section Key Description
[branch] master Production branch name
[branch] develop Development branch name
[prefix] feature, bugfix, release, hotfix, support Branch prefixes
[prefix] versiontag Version tag prefix
[finish] mode Finish behavior: classic, propose, or ask
[sync] strategy Sync strategy: rebase or merge
[propose] open Auto-open browser: true or false

Setting a different remote repo

A remote repo different from .origin. can be specified in the config file:

$ git config gitflow.origin myorigin

Set git specific environment variables.

With git you can set environment variables to change the default behavior of git. You can set these environment variables just for git-flow.

These environment variables can be set in the file .gitflow_export in your home directory. Example of a .gitflow_export file:

export GIT_MERGE_AUTOEDIT=no

Change behavior of gitflow through configuration settings

  • Starting a hotfix, support, or release branch with a dirty tree.
    By default you can not start one when your working tree is dirty. You can change this behavior by setting the following configuration.
    git config --bool --set gitflow.allowdirty
    This can be set like any other git configuration, global, system, or local.

Configuration variables to set flags

The configuration variables are named as follows: gitflow.<command>.<subcommand>.<flags> All variables should be in lower caps.

If the variable is a boolean the following values are valid, the case does not matter:

  • Y
  • YES
  • T
  • TRUE
  • N
  • NO
  • F
  • FALSE

If the variable represents a string surround the value with double quotes.

This is an overview per command of configuration variables you can set. The list is in the form variable - flag - valid value
For reading improvement the prefix gitflow. is not shown here but should be used when you set the variable.

git-flow bugfix

bugfix.start.fetch - fetch - boolean

bugfix.finish.fetch - fetch - boolean
bugfix.finish.rebase - rebase - boolean
bugfix.finish.preserve-merges - preserve-merges - boolean
bugfix.finish.push - push - boolean
bugfix.finish.keep - keep - boolean
bugfix.finish.keepremote - keepremote - boolean
bugfix.finish.keeplocal - keeplocal - boolean
bugfix.finish.force-delete - force_delete - boolean
bugfix.finish.squash - squash - boolean
bugfix.finish.squash-info - squash-info - boolean
bugfix.finish.no-ff - no-ff - boolean

bugfix.rebase.interactive - interactive - boolean
bugfix.rebase.preserve-merges - preserve-merges - boolean

bugfix.delete.force - force - boolean
bugfix.delete.remote - remote - boolean

bugfix.propose.draft - draft - boolean (LBEM Edition)
bugfix.propose.assignee - assignee - string (LBEM Edition)
bugfix.propose.reviewer - reviewer - string (LBEM Edition)
bugfix.propose.labels - label - string (LBEM Edition)
bugfix.propose.autolabel - autolabel - boolean (LBEM Edition)

git-flow feature

feature.start.fetch - fetch - boolean

feature.finish.fetch - fetch - boolean
feature.finish.rebase - rebase - boolean
feature.finish.preserve-merges - preserve-merges - boolean
feature.finish.push - push - boolean
feature.finish.keep - keep - boolean
feature.finish.keepremote - keepremote - boolean
feature.finish.keeplocal - keeplocal - boolean
feature.finish.force-delete - force_delete - boolean
feature.finish.squash - squash - boolean
feature.finish.squash-info - squash-info - boolean
feature.finish.no-ff - no-ff - boolean

feature.rebase.interactive - interactive - boolean
feature.rebase.preserve-merges - preserve-merges - boolean

feature.delete.force - force - boolean
feature.delete.remote - remote - boolean

feature.propose.draft - draft - boolean (LBEM Edition)
feature.propose.assignee - assignee - string (LBEM Edition)
feature.propose.reviewer - reviewer - string (LBEM Edition)
feature.propose.labels - label - string (LBEM Edition)
feature.propose.autolabel - autolabel - boolean (LBEM Edition)

git-flow hotfix

hotfix.start.fetch - fetch - boolean

hotfix.finish.fetch - fetch - boolean
hotfix.finish.sign - sign - boolean
hotfix.finish.push - push - boolean
hotfix.finish.keep - keep - boolean
hotfix.finish.keepremote - keepremote - boolean
hotfix.finish.keeplocal - keeplocal - boolean
hotfix.finish.force-delete - force-delete - boolean
hotfix.finish.notag - notag - boolean
hotfix.finish.nobackmerge - nobackmerge - boolean
hotfix.finish.signingkey - signingkey - string
hotfix.finish.message - message - string
hotfix.finish.messagefile - messagefile - string
hotfix.finish.create-release - create-release - boolean (LBEM Edition)

hotfix.rebase.interactive - interactive - boolean
hotfix.rebase.preserve-merges - preserve-merges - boolean

hotfix.delete.force - force - boolean

git-flow init

init.defaults - defaults - boolean

git-flow sync (LBEM Edition)

sync.prune - prune - boolean

git-flow release

release.start.fetch - fetch - boolean

release.finish.fetch - fetch - boolean
release.finish.sign - sign - boolean
release.finish.push - push - boolean
release.finish.keep - keep - boolean
release.finish.keepremote - keepremote - boolean
release.finish.keeplocal - keeplocal - boolean
release.finish.force-delete - force-delete - boolean
release.finish.notag - notag - boolean
release.finish.nobackmerge - nobackmerge - boolean
release.finish.squash - squash - boolean
release.finish.squash-info - squash-info - boolean
release.finish.signingkey - signingkey - string
release.finish.message - message - string
release.finish.messagefile - messagefile - string
release.finish.create-release - create-release - boolean (LBEM Edition)

release.branch.fetch - fetch - boolean
release.branch.sign - sign - boolean
release.branch.push - push - boolean
release.branch.notag - notag - boolean
release.branch.squash - squash - boolean
release.branch.squash-info - squash-info - boolean
release.branch.signingkey - signingkey - string
release.branch.message - message - string
release.branch.messagefile - messagefile - string

release.rebase.interactive - interactive - boolean
release.rebase.preserve-merges - preserve-merges - boolean

release.delete.fetch - fetch - boolean
release.delete.remote - remote - boolean

git-flow support

support.start.fetch - fetch - boolean

support.rebase.interactive - interactive - boolean
support.rebase.preserve-merges - preserve-merges - boolean

Example

You can set these variables using the git config command

git config gitflow.release.finish.fetch yes

gitflow follows the same pattern for reading the options as git config. You can use the options --system, --global, --local to write to that location and gitflow will behave similar in reading the configuration as git.


LBEM Edition Configuration Variables

The LBEM Edition adds the following configuration variables:

Finish Mode

Controls how git flow feature finish and git flow bugfix finish behave.

git flow config set finishmode <mode>
Value Description
classic Traditional merge into develop (default)
propose Create a pull request instead of merging
ask Prompt each time: classic, propose, or abort

Sync Strategy

Controls how git flow feature sync and git flow bugfix sync update branches.

git flow config set syncstrategy <strategy>
Value Description
rebase Rebase feature/bugfix branch on base branch (default)
merge Merge base branch into feature/bugfix branch

Sync Prune

Controls whether sync automatically prunes stale local branches.

git config gitflow.sync.prune true

When enabled, git flow feature sync and git flow bugfix sync will prompt to delete local branches whose remote tracking branches have been deleted (e.g., branches merged via GitHub PR).

Safety: Branches with unpushed local commits are never auto-deleted.

Propose Browser Open

Controls whether the browser opens automatically when using propose.

git flow config set proposeopen <boolean>
Value Description
true Auto-open browser for PR URL (default)
false Only print PR URL, don't open browser

Propose Draft

Controls whether PRs are created as drafts by default.

git config gitflow.feature.propose.draft true
git config gitflow.bugfix.propose.draft true

Propose Assignee

Default assignee(s) for PRs created with propose.

git config gitflow.feature.propose.assignee "username"
git config gitflow.bugfix.propose.assignee "user1,user2"

Propose Reviewer

Default reviewer(s) for PRs created with propose.

git config gitflow.feature.propose.reviewer "reviewer1"
git config gitflow.bugfix.propose.reviewer "reviewer1,reviewer2"

Propose Labels

Default label(s) for PRs created with propose.

git config gitflow.feature.propose.labels "enhancement"
git config gitflow.bugfix.propose.labels "bug,fix"

Propose Autolabel

Automatically add branch type as a label (e.g., "feature" or "bugfix").

git config gitflow.feature.propose.autolabel true
git config gitflow.bugfix.propose.autolabel true

Create GitHub/GitLab Releases

Controls whether releases are created automatically on release/hotfix finish.

git config gitflow.release.finish.create-release true
git config gitflow.hotfix.finish.create-release true

When enabled, git flow release finish and git flow hotfix finish will create a GitHub/GitLab release using the CLI tools (gh or glab).

Example LBEM Configuration

# Set up for PR-based workflow
git flow config set finishmode propose
git flow config set syncstrategy rebase
git flow config set proposeopen true

# Configure propose defaults
git config gitflow.feature.propose.draft true
git config gitflow.feature.propose.reviewer "lead-dev"
git config gitflow.feature.propose.autolabel true

# Enable sync pruning
git config gitflow.sync.prune true

# Enable GitHub releases
git config gitflow.release.finish.create-release true
git config gitflow.hotfix.finish.create-release true

# Export to share with team
git flow config export
git add .gitflow
git commit -m "Configure git-flow for PR workflow"

Clone this wiki locally