git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: bug report

From
Pranit Bauva <pranit.bauva@gmail.com>
Date
May 13, 2016, 07:10 UTC
Message-ID
<CAFZEwPMe2W2R2GghMnyQ4BLyvm00oHEweNSZYrqn+=9BhSazvw@mail.gmail.com>
In-Reply-To
<CABKuJ_SEK-t93sCmj6aFSAbk8muX_ocQx6ZQZV3ZrNmvVmvDQA@mail.gmail.com>
On Fri, May 13, 2016 at 12:27 PM, 李本超 <libenchao@gmail.com> wrote:
Show 10 quoted lines
> 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

Previous: 李本超Next: 李本超
Message 6 of 9 in “bug report”
  1. 李本超May 13, 2016
  2. Pranit BauvaMay 13, 2016
  3. 李本超May 13, 2016
  4. Pranit BauvaMay 13, 2016
  5. 李本超May 13, 2016
  6. Pranit BauvaMay 13, 2016
  7. 李本超May 13, 2016
  8. Jeff KingMay 13, 2016
  9. 李本超May 13, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.