Assume that I have a following tree:
$ git log --graph --oneline --decorate --all
* 7b261e3 (HEAD, master) Revert "A"
* 32f08ae A
| * f0b008f (b) A
|/
* 83c0052 init
$ git log -p --graph --decorate --all
* commit 7b261e3534e12446b75d286ef94556d077a9ee87 (HEAD, master)
| Author: Shin Kojima <shin@kojima.org>
| Date: Tue Jun 10 03:13:29 2014 +0900
|
| Revert "A"
|
| This reverts commit 32f08ae6e6a8036a7ed0a72568ac41b3e0fe806a.
|
| diff --git a/test b/test
| index f16344d..26604dc 100644
| --- a/test
| +++ b/test
| @@ -1,3 +1,3 @@
| foo
| -hoge
| +bar
| buz
|
* commit 32f08ae6e6a8036a7ed0a72568ac41b3e0fe806a
| Author: Shin Kojima <shin@kojima.org>
| Date: Tue Jun 10 03:12:18 2014 +0900
|
| A
|
| diff --git a/test b/test
| index 26604dc..f16344d 100644
| --- a/test
| +++ b/test
| @@ -1,3 +1,3 @@
| foo
| -bar
| +hoge
| buz
|
| * commit f0b008f3da2426611b40560ce4b64be6e32707e5 (b)
|/ Author: Shin Kojima <shin@kojima.org>
| Date: Tue Jun 10 03:12:18 2014 +0900
|
| A
|
| diff --git a/test b/test
| index 26604dc..f16344d 100644
| --- a/test
| +++ b/test
| @@ -1,3 +1,3 @@
| foo
| -bar
| +hoge
| buz
|
* commit 83c00525a1d8168ae251cf33c00178d398ef4b54
Author: Shin Kojima <shin@kojima.org>
Date: Tue Jun 10 03:11:38 2014 +0900
init
diff --git a/test b/test
new file mode 100644
index 0000000..26604dc
--- /dev/null
+++ b/test
@@ -0,0 +1,3 @@
+foo
+bar
+buz
7b261e3
is a revert commit of 32f08ae
and f0b008f
is a cherry-pick from 32f08ae
.
When I merge branch b
into master
, I found that git ignores the revert commit(7b261e3
) silently and the result in a different outcome from rebasing method. It seems like I still have to evaluate degradations and see for myself in this case.
Merge made by the 'recursive' strategy.
test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
$ cat test
foo
hoge
buz
Are there any ways to detect conflict? What I have done wrong?
git version 2.0.0