git cherry-pick : 特定のcommitをマージする
git checkout dev
git log
commit cbd071da2516d91a2479716ff8c3b92a7f5f1c27
Author: Junichi Otake <@gmail.com>
Date: Mon May 27 17:51:42 2013 +0900
Author: Junichi Otake <@gmail.com>
Date: Mon May 27 17:51:42 2013 +0900
fix preall init
とこのコミットだけをmasterに反映する
git checkout master
git cherry-pick cbd071da2516d91a2479716ff8c3b92a7f5f1c27
git cherry-pick cbd071da2516d91a2479716ff8c3b92a7f5f1c27
commit 43eb3799f961e762b691d26f92ff259b5111e18d
Author: Junichi Otake <@gmail.com>
Date: Mon May 27 17:51:42 2013 +0900
Author: Junichi Otake <@gmail.com>
Date: Mon May 27 17:51:42 2013 +0900
fix preall init
diff –git a/view/sp/scripts/sample/result.php b/view/sp/scripts/
index a70c85e..51def8a 100644
— a/view/sp/scripts/sample/result.php
+++ b/view/sp/scripts/sample/result.php
@@ -10,6 +10,7 @@
+ $preall = -1;
こんな感じで新しくコミットされました。
=======
コミットされるとあれなので、まずは、コミットせず変更を反映するには -n
例えば、こんなとき、一つのファイルの変更だけ利用したいので、 -nで反映してみます。
commit a537f55352f3aac3f4a67a2d0ffe96cb14d84400
Author: Junichi Otake <@gmail.com>
Date: Mon May 27 17:58:09 2013 +0900
Author: Junichi Otake <@gmail.com>
Date: Mon May 27 17:58:09 2013 +0900
v2.4.2 update header
fabfile.py | 2 +-
view/sp/scripts/game/header.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
ステージングされているので
git reset
して、
入らない変更を戻して、
git checkout fabfile.py
してという感じです。