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

Re: "git rm" is not a valid merge resolution?

From
Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
Date
Mar 21, 2011, 20:01 UTC
Message-ID
<4D87AE83.6080008@gmail.com>
In-Reply-To
<7vvczcp8w7.fsf@alter.siamese.dyndns.org>
W dniu 21.03.2011 20:32, Junio C Hamano pisze:
Show 16 quoted lines
> Piotr Krukowiecki <piotr.krukowiecki@gmail.com> writes:
> 
>> git-status shows a hint that says
>>     use "git add/rm <file>..." as appropriate to mark resolution
>>  
>> But if I "git rm file" the file gets deleted. Is this really the 
>> appropriate merge resolution?
>>
>> I would expect "git rm" to maybe reset all the merge changes but
>> it seems to just delete the file.
> 
> Yes, if your side has a commit that updates a path since branches forked
> (e.g. fixing a minor bug in an implementation of a function defined
> there), and the other branch you are merging removed the path (e.g. fixing
> a higher level callers and made that buggy function no longer necessary),
> taking their removal can be a valid conflict resolution.

Please see my other mail - file deletion can also be done by "git add". I feel that suggesting something that is wrong in most cases is wrong :)

-- 
Piotr Krukowiecki
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 6 in “"git rm" is not a valid merge resolution?”
  1. Piotr KrukowieckiMar 21, 2011
  2. Matthieu MoyMar 21, 2011
  3. Piotr KrukowieckiMar 21, 2011
  4. Junio C HamanoMar 21, 2011
  5. Piotr KrukowieckiMar 21, 2011
  6. Junio C HamanoMar 21, 2011

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.