14
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

既存レポジトリに git-flow 導入

Last updated at Posted at 2012-10-08

まず git-flow のインストール。

$ brew install git-flow

master 以外のブランチがない場合は、develop 用のブランチを作っておいてから git flow init するだけ。feature 用のブランチがある場合は、後で git branch -m bar feature/bar とかすればいいのではないかと思います。

$ git branch develop
$ git flow init

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 status
# On branch master
nothing to commit (working directory clean)
$ git branch
  develop
* master
$ git flow feature
No feature branches exist.

You can start a new feature branch:

    git flow feature start <name> [<base>]

$ git flow feature start foo
Switched to a new branch 'feature/foo'

Summary of actions:
- A new branch 'feature/foo' was created, based on 'develop'
- You are now on branch 'feature/foo'

Now, start committing on your feature. When done, use:

     git flow feature finish foo

$ git branch
  develop
* feature/foo
  master

参考
https://gist.github.com/538326

14
13
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
14
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?