LoginSignup
10
12

More than 5 years have passed since last update.

Macで、git-flowとgit-flow-hookを導入する。

Last updated at Posted at 2016-07-11

git-flowの導入

git-flowを試すを参考に、次のコマンドを実行する。
(すでに、プロジェクトのリポジトリは存在している前提)

$ brew install git-flow

git-flow-hookの導入

小規模開発のgit-flowの導入を楽にするブランチルールと拡張スクリプト配布を参考にする。

git-flow-hookを参考に、次のコマンドを実行する。

※前提として、既存リポジトリの「master」、「develop」の両方をチェックアウトしておく。

git-flowの導入

$ cd git_repository_root
$ git flow init -d
Using default branch names.

Which branch should be used for bringing forth production releases?
   - develop
   - master
Branch name for production releases: [master] 

Which branch should be used for integration of the "next release"?
   - develop
Branch name for "next release" development: [develop] 

How to name your supporting branch prefixes?
Feature branches? [feature/] 
Release branches? [release/] 
Hotfix branches? [hotfix/] 
Support branches? [support/] 
Version tag prefix? [] 

git拡張コマンドのインストール

# git拡張コマンド(/usr/local/binにインストールされます。一度のみの実行で問題ありません)
$ sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/eaglesakura/git-flow-hook/master/installer/install-commands.sh)"
# gitリポジトリのフックスクリプト(.git/hooksにインストールされます。リポジトリごとに実行しなければなりません)
$ cd git_repository_root
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/eaglesakura/git-flow-hook/master/installer/install-hooks.sh)"

git拡張コマンド

git拡張コマンド を使う。

10
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
12