GitHub
git-flow

CentOSにgit-flowをインストールする方法

More than 3 years have passed since last update.


経緯

git-flowを使おうと思い、git-flowのサイト通りに$ apt-get install git-flowでインストールしようと思ったらbash: git-flow: コマンドが見つかりませんと怒られたのでメモ。


方法


①root権限になる

$ sudo su -


②インストールディレクトリまで移動

$ cd /usr/local/src


③インストール

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


④以下実行されればOK

### gitflow no-make installer ###

Installing git-flow to /usr/local/git/bin
Cloning repo from GitHub to gitflow
Cloning into 'gitflow'...
remote: Reusing existing pack: 1407, done.
remote: Total 1407 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1407/1407), 623.29 KiB | 208.00 KiB/s, done.
Resolving deltas: 100% (689/689), done.
Updating submodules
Submodule 'shFlags' (git://github.com/nvie/shFlags.git) registered for path 'shFlags'
Cloning into 'shFlags'...
remote: Reusing existing pack: 454, done.
remote: Total 454 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (454/454), 130.79 KiB | 55.00 KiB/s, done.
Resolving deltas: 100% (338/338), done.
Submodule path 'shFlags': checked out '2fb06af13de884e9680f14a00c82e52a67c867f1'
install: creating directory `/usr/local/git'
install: creating directory `/usr/local/git/bin'
`gitflow/git-flow' -> `/usr/local/git/bin/git-flow'
`gitflow/git-flow-init' -> `/usr/local/git/bin/git-flow-init'
`gitflow/git-flow-feature' -> `/usr/local/git/bin/git-flow-feature'
`gitflow/git-flow-hotfix' -> `/usr/local/git/bin/git-flow-hotfix'
`gitflow/git-flow-release' -> `/usr/local/git/bin/git-flow-release'
`gitflow/git-flow-support' -> `/usr/local/git/bin/git-flow-support'
`gitflow/git-flow-version' -> `/usr/local/git/bin/git-flow-version'
`gitflow/gitflow-common' -> `/usr/local/git/bin/gitflow-common'
`gitflow/gitflow-shFlags' -> `/usr/local/git/bin/gitflow-shFlags'


⑤インストールされているか確認

$ git flow

下記のように表示されればインストール完了。

$ git flow

usage: git flow <subcommand>

Available subcommands are:
init Initialize a new git repo with support for the branching model.
feature Manage your feature branches.
release Manage your release branches.
hotfix Manage your hotfix branches.
support Manage your support branches.
version Shows version information.

Try 'git flow <subcommand> help' for details.