On Fri, May 13, 2016 at 12:27 PM, 李本超 <libenchao@xxxxxxxxx> wrote: > Yes, you got the right understanding of my problem. > > You are right, the git behavior is quite correct. But I met this > problem in my practical work: > > My colleague added a method but I didn't know. I also added the same method. > Then I found that I didn't need the method actually, so I deleted it. > My colleague merged to the master before me. When I wanted to merge, I found > conflicts with master. And I rebased to current master. And That method was > deleted finally without any warning or information. I am quite sure that there would be an output to show that there are conflicts and it would be suggesting you to first resolve the conflicts and there would also be markers in the file like ">>>>>" and "======" and the file would be marked with "both modified". After you resolve the conflicts, you can add the file by using git-add and then "git rebase --continue" to proceed. If you find out that there is some problem, then you can always use "git rebase --abort" to abort the rebase process and get to the initial state *perfectly* without any glitches. > Do you think Git should output something to warn the user or I just > use Git in a wrong way ? It does warn. I don't know how it got missed in your case. This is quite a common problem and even I have faced this quite for quite a lot of times now and it always did warn me. > Thanks. I will recommend you reading this article[1]. I know its a bit of a long read but it will help a lot. [1]: http://tedfelix.com/software/git-conflict-resolution.html Regards, Pranit Bauva -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html