'Git flow command error: 'flow' is not a git command

I am very new to Git and am starting to learn the command line version. I believe my git flow is not installed correctly. I am running this from a pc.

When i run following command:

git flow feature start JamesTest

I get the following error:

git: 'flow' is not a git command. See 'git --help'
Did you mean any of these?

Looks like the git flow command is not being recognized from all paths? How do I fix this?



Solution 1:[1]

The git flow is not installed in your machine. Just run this command,

macOS:

$ brew install git-flow-avh

Linux:

$ apt-get install git-flow

Windows:

$ wget -q -O - --no-check-certificate https://raw.github.com/petervanderdoes/gitflow-avh/develop/contrib/gitflow-installer.sh install stable | bash

Source git-flow cheatsheet by Daniel Kummer

After successful installation run git flow init in your project and then follow the instructions to configure the git flow.

Solution 2:[2]

Git is installed but Gitflow is not. Gitflow is a Git extension and has to be installed separately.

Install it as described on GitHub and you should be fine ;)

Solution 3:[3]

If you want to install Git Flow on Windows, do as follows (based on this instructions)

  1. Clone the git flow repository

    git clone --recursive git://github.com/nvie/gitflow.git
    
  2. Download the getopt archive and extract the getopt.exe file to the location where Git executable is installed (something like C:\Programs\Git\bin)

  3. Execute the following command, where the argument is the Git path installation (again, something like C:\Programs\Git). You don't need to specify the bin directory here.

    contrib\msysgit-install.cmd "C:\Programs\Git"
    

And that's it. Check that all is working using the command git flow

Solution 4:[4]

For mac users, just make sure git-flow is installed. If it is not installed, run these commands respectively:

  1. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. brew install git-flow
  3. export PATH=/opt/homebrew/bin:$PATH
  4. git flow init

Sometimes even git-flow is installed, it doesn't work, all what you need is to export brew before using git flow:

export PATH=/opt/homebrew/bin:$PATH

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sybozz
Solution 2 Luboš Turek
Solution 3 Luís Cruz
Solution 4