36

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?

Kevin Brown-Silva
  • 40,873
  • 40
  • 203
  • 237
NetSystemAdmin
  • 505
  • 1
  • 6
  • 16

4 Answers4

48

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.

sybozz
  • 867
  • 8
  • 7
22

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 ;)

Luboš Turek
  • 6,273
  • 9
  • 40
  • 50
2

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

Luís Cruz
  • 14,780
  • 16
  • 68
  • 100
1

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
Osama Remlawi
  • 2,356
  • 20
  • 21