Skip to content

Installation

Konstantin edited this page Dec 15, 2025 · 18 revisions

The following instructions will guide you through installing git-flow LBEM Edition on various platforms.

The recommended installation methods are via Homebrew (macOS & Linux) or the Installer Script.

Homebrew (macOS & Linux)

The easiest way to install git-flow LBEM Edition is via Homebrew.

# Tap the LBEM-CH Homebrew repository
brew tap LBEM-CH/homebrew-gitflow-lbem

# Install git-flow-lbem
brew install git-flow-lbem

To upgrade to the latest version:

brew update
brew upgrade git-flow-lbem

For the development version:

brew install git-flow-lbem --HEAD

Note: Homebrew works on both macOS (including Apple Silicon Macs) and Linux via Homebrew on Linux.

Installer Script

Quick one-line installation using the automated installer:

Stable release:

wget -q https://raw.githubusercontent.com/LBEM-CH/gitflow-lbem/develop/contrib/gitflow-installer.sh && sudo bash gitflow-installer.sh install stable; rm gitflow-installer.sh

Or using curl:

curl -sL https://raw.githubusercontent.com/LBEM-CH/gitflow-lbem/develop/contrib/gitflow-installer.sh | sudo bash -s install stable

Development release:

wget -q https://raw.githubusercontent.com/LBEM-CH/gitflow-lbem/develop/contrib/gitflow-installer.sh && sudo bash gitflow-installer.sh install develop; rm gitflow-installer.sh

Or using curl:

curl -sL https://raw.githubusercontent.com/LBEM-CH/gitflow-lbem/develop/contrib/gitflow-installer.sh | sudo bash -s install develop

Manual Installation

git clone https://github.com/LBEM-CH/gitflow-lbem.git
cd gitflow-lbem
sudo make install

By default, git-flow will be installed in /usr/local/bin. To change the installation prefix:

sudo make prefix=/opt/local install

Post-installation Setup

git-flow depends on GNU getopt.

Instructions for Linux

Most Linux distributions come with GNU getopt pre-installed. You can verify this by running

getopt --version

If it's not installed, use your package manager to install the util-linux package:

  • Debian/Ubuntu: sudo apt-get install util-linux
  • Fedora/RHEL/CentOS: sudo yum install util-linux or sudo dnf install util-linux
  • Arch Linux: sudo pacman -S util-linux
  • Alpine Linux: sudo apk add util-linux
Instructions for MacOS

You need to install and configure GNU getopt:

  1. Install GNU getopt via Homebrew:
    brew install gnu-getopt
  2. Create ~/.gitflow_export with the following content:
    export FLAGS_GETOPT_CMD="$(brew --prefix gnu-getopt)/bin/getopt"
  3. Source this file in your shell configuration (~/.zshrc or ~/.bash_profile):
    [ -f ~/.gitflow_export ] && source ~/.gitflow_export

Other Platforms

For installation instructions on BSD systems, Windows, and other platforms, please refer to the gitflow-cjs Installation Wiki. The installation process is identical—just replace CJ-Systems/gitflow-cjs with LBEM-CH/gitflow-lbem in the clone URLs.


Verification & Initialization

After installation, you can check the installed version by running:

git flow version
# Should output something like: X.X.X-lbem.X

To initialize git-flow in your repository, run:

cd your-repo
git flow init

For shell completion (bash/zsh/fish), install gitflow-lbem-completion.


Troubleshooting

GNU getopt Requirement

git-flow requires GNU getopt, which differs from the BSD getopt on macOS.

Checking Your getopt Version

getopt --version

If this returns an error or shows a BSD version, you need to install GNU getopt.

Common Issues

"flags: FATAL unable to determine getopt version"

  • Install GNU getopt (see platform-specific instructions above)
  • On macOS with manual installation, ensure FLAGS_GETOPT_CMD is set correctly

Command not found after installation

  • Ensure /usr/local/bin (or your custom prefix) is in your PATH
  • Try running hash -r to refresh your shell's command cache
  • Restart your terminal

Conflicts with other git-flow versions

  • git-flow-lbem conflicts with git-flow, git-flow-avh, and git-flow-cjs
  • Uninstall other versions before installing LBEM edition

Clone this wiki locally