はじめに
学習中にgit-flowでbranchの管理をしようと思い以下のコマンド使ったら動かないって話。
git flow init
問題
以下のエラーが出ました。
$ git flow init
git: 'flow' is not a git command. See 'git --help'.
The most similar commands are
reflog
show
原因はOSがMacだったからです。
WindowsだとGit for Windowsをインストールすると、git-flowも一緒にインストールされるらしい。
解決方法
brew install git-flow
このコマンドを打つだけ。(すでに、プロジェクトのリポジトリは存在している前提)
git flow init
その後に初期化をしてあげれば完成です!
おわりに
OSが違うとたまにこういうので躓きますね。
参考
https://qiita.com/komekome111/items/6533c3a3e5c44138a0e5
https://qiita.com/kazunorisasaki/items/4e615f6f6e83c11d43fa
https://blog.nakamu.me/posts/mac-git-flow-install