• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

s21gブログではmasterの他にdeployブランチがあり、下記のようなフローで運用しています。

  1. 普段はmasterにpushして
  2. deployできる状態になったらdeployにmasterの変更を反映
  3. deployをpush&cap deploy

ローカルでもdeployブランチとすればよかったのですが、ローカルを意識したいのでlocal_deployという名前にしてみました。そのことで勉強になったので、書いてみたいと思います。

###リモートのoriginブランチを確認
shell>>
git branch -a

  • master
    origin/HEAD
    origin/deploy
    origin/master
    <<--

###ローカルにブランチを作成
shell>>
git branch local_deploy origin/deploy
git branch -a #追加されているのを確認
git checkout local_deploy
<<--

また下記のコマンド1つで、ブランチを作ってcheckoutまでをやってくれます。

shell>>
git checkout -b local_deploy origin/deploy
<<--

git checkout -b <new> <start-point>
create a new branch <new> referencing <start-point>, and check it out.
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#manipulating-branches

###masterの変更をlocal_deployブランチに反映
shell>>
git checkout master
git pull --rebase -v #masterを最新に, +verbose
git checkout local_deploy
git merge master
git push origin local_deploy:refs/heads/deploy
<<--

git merge masterの前後でちゃんとファイルが変更されているか見てみましたがちゃんとmergeできていました。また、pushの際のsrc:dstの指定の仕方がこのままでは面倒なので調べて後日また書いてみようと思います。

コンフリクトした時は修正後コミットし、上のpushコマンドを発行すればokです。

shell>>
#(コンフリクトしたファイルを修正後)
git add some.file
git commit -m "merged from master"
<<--

posted by satoko satoko on Wed 19 Nov 2008 at 14:32 with 2 comments
gitster gitster 01/07 19:06
リポジトリの.git/configに、

[remote "origin"]
push = refs/heads/local_deploy:refs/heads/deploy

を追加、とか?
satoko satoko 01/08 10:33
アドバイスありがとうございます!試してみます♪
Contents rssrss
NSAssertやNSLogを無効にする:-DNS_BLOCK_ASSERTIONS=1とNS_BLOCK_ASSERTIONS
GDBでview.frameを表示させる
Core Animationについてのリンク集
[iPhone] new BSDライセンスについてライセンス引用のメモ
Implementing a Container View Controller in UIViewController Class Reference
UITableView用のNSIndexPathの作り方
Xcodeのテンプレート、View-based ApplicationとWindow-based Applicationの違い
CopyOnSelectのLion対応
Xcode4のCode Snippetsを別のPCに移動する+gitで管理する
[iPhone] Singleton: iOS4以降はGCDのdispatch_onceを使う
Tags
iphone開発gitIBInterfaceBuilderiOSSIMBLSnippetsterminaltwitterxcodeXcode4
Comments rssrss
https://rootskitchen.bar/ https://rootskitchen.bar/: Just had a solid session playing the crash format ... 05/18 17:27
guest guest: Optimizar el tiempo durante un viaje de negocios e... 05/18 00:46
https://foolsandkings.bar/ https://foolsandkings.bar/: Wrapped up a cracking night session grinding crash... 05/17 19:23
guest guest: Para muchos turistas, el transporte publico y la l... 05/15 18:22
https://safeedsautotransport.com/ https://safeedsautotransport.com/: Многие пользователи в Узбекистане интересуются, на... 05/13 14:36
evlnwyiyh evlnwyiyh: something new and exciting [url=http://www.gyxb4s... 05/08 11:27
guest guest: The creative community and travel enthusiasts note... 05/07 02:59
https://www.thegameroom.org/online-casinos/100-free-spins/ https://www.thegameroom.org/online-casinos/100-free-spins/: Frisse xxx platforms brengen innovatieve inhoud vo... 05/03 11:12
Services from s21g
YOMU Web小説リーダー
小説投稿サイトの公式ページを開き、WebView表示と読み上げ向け表示を切り替えて、移動中や作業中にもWeb小説の続きを聴きやすくするiPhoneアプリです。
補助探
公開されている補助金・助成金情報を集約し、条件に合う制度を探しやすくするサービスです。
jotter.me
個人開発者のためのホスティング一体型ノートサービス
ハンドミラー
iPhone向けの手鏡アプリ
ツイプロ(twpro)
Twitterプロフィールの高速検索エンジン