git merge

master に戻してpullした。

$ git checkout master
Switched to branch ‘master’
Your branch is behind ‘origin/master’ by 3 commits, and can be fast-forwarded.
$ git pull
@’s password:
Updating 0197431..c4207d6
Fast-forward
Data/Kyoto/Octo.php            |    1 +
Data/Kyoto/Octo/Aucru/Item.php |    2 +-
Web/Aucru/Script/Set.php       |    3 +++
3 files changed, 5 insertions(+), 1 deletions(-)

level99というブランチからマージしてみる。

$ git merge level99
Auto-merging Data/Kyoto/Octo.php
CONFLICT (content): Merge conflict in Data/Kyoto/Octo.php
Automatic merge failed; fix conflicts and then commit the result.

見事にコンフリクト。

$ git status
# On branch master
# Changes to be committed:
#
#       modified:   .gitignore
#       modified:   Data/Kyoto.php
#       new file:   Data/Kyoto/Mixi/Level99/Player.php
#       new file:   Data/Kyoto/Mixi/Level99/Session.php
#       new file:   Data/Kyoto/Mixi/Level99/Tower.php
#       new file:   Data/Kyoto/Mixi/Level99/Tower/Queue.php
#       modified:   Data/Memcached.php
#       new file:   Data/Memcached/Queue.php
#       modified:   Debug.php
#       new file:   Debug/Service.php
#       modified:   Platform/Mixi.php
#       modified:   Platform/Mixi/Touch.php
#       new file:   Platform/Mixi2.php
# — 省略
#
# Unmerged paths:
#   (use “git add/rm …” as appropriate to mark resolution)
#
# both modified: Data/Kyoto/Octo.php
#
<<<<<<< HEAD
bbb
=======
aaa
>>>>>>> level99

みたいなのを修正して

git add 対象ファイル

した。

$ git commit

$ git log -1
commit 0338e683f952387b3b72b95ee16bd7a23652ac20
Merge: c4207d6 497677f
Author: Junichi Otake
Date:   Mon Oct 15 01:01:07 2012 +0900

   Merge branch ‘level99′
   
   Conflicts:
       Data/Kyoto/Octo.php

データをpushして他でcloneを作って確認して問題なければ開発用 branchを消す。
cloneして level99とmasterのdiffを取ったが問題無かた。

$ git branch -d level99

This entry was posted on 月曜日, 10月 15th, 2012 at 1:09 AM and is filed under git. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。