git flow hotfix の利用

📅 2013/05/17

git git flow

git flow hotfixがしっくりこなかったのでダミーリポジトリで調査してみた。

git flow hotfixではstartの後に指定したものがそのままタグ名になり branchにはデフォルトのままだとhotfixのprefixが付与される。 (自分は勝手につくと思い込んでた)

initしてみる

$ git flow init

Which branch should be used for bringing forth production releases?
   - master
Branch name for production releases: [master] 
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? [] release/

branch確認

$ git branch
  develop
* hotfix/fix_nullpo
  master

fix完了

$ git flow hotfix finish fix_nullpo                                                                                                                       
error: Cannot delete the branch 'hotfix/fix_nullpo' which you are currently on.

Summary of actions:
- Latest objects have been fetched from 'origin'
- Hotfix branch has been merged into 'master'
- The hotfix was tagged 'release/fix_nullpo'
- Hotfix branch has been back-merged into 'develop'
- Hotfix branch 'hotfix/fix_nullpo' has been deleted

branch確認

$ git branch
  develop
* hotfix/fix_nullpo
  master

tag確認

git tag
release/fix_nullpo

hotfixのものにreleaseで指定したprefixがつくということはrelease=hotfixという認識で問題なさそうだ。

Git flowの活用事例の利用例で

上司「不具合の発生数を集計してください」

grep tag | grep "fix/" | wc -l

と出ているがreleaseのprefixにreleaseとか入れちゃうとちょっと紛らわしくなるので 何も入れずにgit flow hotfix startの時にfix/を入れてみようと思う。

余談だけどタグはcpみたいな扱いしかできずfix/のprefixつけ忘れたものの付け替えはセルフサービスになるのね。

$ git tag fix/gatsu gatsu
$ git tag -d gatsu

git flow はじめました(メモ)

📅 2013/05/15

git git flow

新機能開発開始

$ git flow feature start new_function

新機能開発終了

$ git flow feature finish new_function
$ git push origin develop

新機能開発やっぱやめ

$ git branch
* develop
  feature/new_function
  master
$ git branch -d feature/new_function

新機能をリモートへpush

$ git push origin develop

EGit + Eclipse + git flow

📅 2013/05/14

Android Eclipse git git flow

既存リポジトリにdevelopブランチを作成.

git branch develop
git push origin develop

EGitからURI指定でインポート後にgit flowの初期化を行う.

git checkout -b develop origin/develop
git config --global --add marge.ff false
git flow init

さあ,開発の時間だ.

git flow feature start camera_filter