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(-)
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.
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
#
# 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
#
# both modified: Data/Kyoto/Octo.php
#
<<<<<<< HEAD
bbb
=======
aaa
>>>>>>> level99
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