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

Merge: "git rm bla": "bla: needs merge", but still removes file "bla"

From
UWUlrich Windl <ulrich.windl@rz.uni-regensburg.de>
Date
Jul 17, 2019, 07:58 UTC
Message-ID
<5D2ED50D020000A100032435@gwsmtp.uni-regensburg.de>
Hi!

I just had "an interesting case" for a merge with conflicts: The merge re-introduced a file that had been renamed (say old one is "bla", and the new one is "foo"). After merging the changes from bla into foo, I added foo, trying to remove bla:

> git add foo
> git rm bla

bla: needs merge rm 'bla'

The interesting part is that the file was still removed, while claiming "needs merge" before:
> git rm bla
fatal: pathspec 'bla' did not match any files
(git-2.12.3-27.14.1.x86_64 from SLES12 SP4)

Regards, Ulrich

Next: Junio C Hamano
Message 1 of 6 in “Merge: "git rm bla": "bla: needs merge", but still removes file "bla"”
  1. Ulrich WindlJul 17, 2019
  2. Junio C HamanoJul 17, 2019
  3. rm: resolving by removal is not a warning-worthy eventJunio C Hamano, Jul 17, 2019
  4. Jeff KingJul 18, 2019
  5. Junio C HamanoJul 18, 2019
  6. Jeff KingJul 18, 2019

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.