Repository navigation
Installation
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.
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-lbemTo upgrade to the latest version:
brew update
brew upgrade git-flow-lbemFor the development version:
brew install git-flow-lbem --HEADNote: Homebrew works on both macOS (including Apple Silicon Macs) and Linux via Homebrew on Linux.
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.shOr using curl:
curl -sL https://raw.githubusercontent.com/LBEM-CH/gitflow-lbem/develop/contrib/gitflow-installer.sh | sudo bash -s install stableDevelopment 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.shOr using curl:
curl -sL https://raw.githubusercontent.com/LBEM-CH/gitflow-lbem/develop/contrib/gitflow-installer.sh | sudo bash -s install developgit clone https://github.com/LBEM-CH/gitflow-lbem.git
cd gitflow-lbem
sudo make installBy default, git-flow will be installed in /usr/local/bin. To change the installation prefix:
sudo make prefix=/opt/local installgit-flow depends on GNU getopt.
Instructions for Linux
Most Linux distributions come with GNU getopt pre-installed. You can verify this by running
getopt --versionIf 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-linuxorsudo 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:
- Install GNU getopt via Homebrew:
brew install gnu-getopt
- Create
~/.gitflow_exportwith the following content:export FLAGS_GETOPT_CMD="$(brew --prefix gnu-getopt)/bin/getopt"
- Source this file in your shell configuration (
~/.zshrcor~/.bash_profile):[ -f ~/.gitflow_export ] && source ~/.gitflow_export
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.
After installation, you can check the installed version by running:
git flow version
# Should output something like: X.X.X-lbem.XTo initialize git-flow in your repository, run:
cd your-repo
git flow initFor shell completion (bash/zsh/fish), install gitflow-lbem-completion.
git-flow requires GNU getopt, which differs from the BSD getopt on macOS.
Checking Your getopt Version
getopt --versionIf this returns an error or shows a BSD version, you need to install GNU getopt.
"flags: FATAL unable to determine getopt version"
- Install GNU getopt (see platform-specific instructions above)
- On macOS with manual installation, ensure
FLAGS_GETOPT_CMDis set correctly
Command not found after installation
- Ensure
/usr/local/bin(or your custom prefix) is in yourPATH - Try running
hash -rto 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