• 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
  • 31

git-pullで私なりの解釈で aha!が来たのでメモします。
これからは git-pull --rebaseにしよー
下記をそのままという感じなのですがw
http://www8.atwiki.jp/git_jp/pub/Documentation.ja/user-manual.html#using-git-rebase

###そういえばトッポさんが言ってた:git-pull --rebaseを使うといいよ
git-pullよりgit-pull --rebaseを使うといいよ(ただしという注意(下記太字)があるのでその辺は注意。ほとんどの人は関係ないと思うんだけど。。。)

Here's a tip for keeping up to date: In lieu of using git pull to download the latest changes, use git pull --rebase. Instead of cluttering the history with a merge commit, it reapplies your changes to the latest upstream. The only caveat is that you shouldn't use this method if you've already published the changes to another repository. Doing so would cause problems for anyone who has already downloaded the original commits.
http://www.tpope.net/rails-git-best-practices

でgit-pullとgit-pull --rebaseの違いをgit-rebaseの説明を読んで理解する

###状況
o--o--O--o--o--o <-- origin
         \
         a--b--c <-- mywork

"mywork"は"origin" から単純に並行に行なわれています
プロジェクトの上流では他の興味深い変更が行なわれ、 "origin" は発展します

###で、(上の状況から)git-pullした場合
o--o--O--o--o--o <-- origin
         \          \
         a--b--c--m <-- mywork

"pull" を使用して変更をマージさせることができます;結果として新しいマージコミットが生成されます

###で、(上の状況から)git-pull --rebaseした場合
originが最新であればgit rebase originでいいと思うのだけど、(originが)最新でない場合はgit-pull --rebaseすればいいのだと解釈しました。

o--o--O--o--o--o <-- origin
                      \
                      a'--b'--c' <-- mywork

これは、mywork からあなたの各コミットを削除し、一時的に (".dotest" という名前のディレクトリ内に)パッチとして保存し、 mywork を origin の最新バージョンの位置に更新し、その後で保存した各パッチを新しい mywork ブランチに適用します。

コンフリクトがある場合は、下記にあるように修正してaddしてgit rebase --continueすればok。

###各git-somethingでのコンフリクト時のリカバリ

  • git merge 時のリカバリ
      o 手動マージ -> 動作確認 -> add -> commit  
  • git rebase 時のリカバリ
      o 手動マージ -> add -> git rebase --continue  
  • git pull 時のリカバリ
      o メンテナの場合 -> 一蹴  
      o ユーザの場合 -> 手動マージ -> add -> commit  
  • git-am 時のリカバリ ( apply mail = メールで送られるパッチの適用 )
      o メンテナの場合 -> 一蹴    
      o ユーザの場合 -> 手動マージ -> add -> git-am --resolved  

http://d.hatena.ne.jp/conceal-rs/20080928/1222612534

###Refs
http://www8.atwiki.jp/git_jp/pub/Documentation.ja/user-manual.html#using-git-rebase
http://www.tpope.net/rails-git-best-practices
http://blog.s21g.com/articles/535:tpope.netさんのRails with Gitのためのベストプラクティス
http://d.hatena.ne.jp/conceal-rs/20080928/1222612534:gitでの開発の流れがわかってかなり++

posted by satoko satoko on Fri 3 Oct 2008 at 17:44 with 0 comments
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://buy-property-uae.com/ https://buy-property-uae.com/: Many international investors believe, in today's e... 04/24 00:16
https://www.gms4you.us/ https://www.gms4you.us/: Reliable reviews confirm, in today's world using l... 04/21 19:41
https://rootskitchen.bar/ https://rootskitchen.bar/: Finished a deadly evening session punting on crash... 04/18 12:17
https://rootskitchen.bar/ https://rootskitchen.bar/: Just wrapped up a cracking arvo session grinding c... 04/17 02:19
https://si-design.ru/o-nas https://si-design.ru/o-nas: Цена дизайн-проекта стабильна и не изменится к кон... 04/10 17:15
https://corporativ-luxe.ru/magiya-solnechnoy-kapli https://corporativ-luxe.ru/magiya-solnechnoy-kapli: Мы работаем для вас без выходных и праздников htt... 04/10 16:20
https://si-design.ru/reutov https://si-design.ru/reutov: Интерьер, оформленный в стиле модернизм, отличаетс... 04/08 06:24
https://sbornye-gruzy-kitay.ru/ https://sbornye-gruzy-kitay.ru/: Реально ли привезти косметику? Там же нужны особые... 04/08 03:06