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

Re: git reset --hard not removing some files

From
Junio C Hamano <junkio@cox.net>
Date
Jun 4, 2006, 09:31 UTC
Message-ID
<7vfyilclna.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060604091601.GN14325@admingilde.org>
Martin Waitz <tali@admingilde.org> writes:
Show 9 quoted lines
> hoi :)
>
> On Fri, Jun 02, 2006 at 07:57:57AM -0700, Junio C Hamano wrote:
>> I would agree in the reproduction recipe Martin gave there is no
>> problem but feature, but at the same time I suspect the recent
>> "reset --hard simplification" has introduced a true regression.
>
> This may have been the bug that bit me.
> Thanks for finding it although I was not able to reproduce it myself!
I found this somewhat the hard way myself.  I have:
        [pull]
                twohead = resolve

in my .git/config -- IOW, I usually do not use recursive strategy myself. When a merge with resolve strategy fails (and with recent trend to busyboxify git commands, many merges between my topics and "next" and/or "master" do), I relied on "reset --hard" followed by the same merge of the topic using "pull -s recursive" to recover things, but it didn't. When pulling a branch with builtin-*.c names into another branch with older names, regressed "reset --hard" left builtin-*.c files behind, and then the next merge attempt complained by saying my untracked working tree files would be overwritten X-<.

Previous: Martin WaitzNext: Martin Waitz
Message 13 of 14 in “git reset --hard not removing some files”
  1. Martin WaitzJun 1, 2006
  2. SeanJun 1, 2006
  3. Jakub NarebskiJun 1, 2006
  4. SeanJun 1, 2006
  5. Jakub NarebskiJun 2, 2006
  6. Linus TorvaldsJun 1, 2006
  7. Martin WaitzJun 2, 2006
  8. SeanJun 2, 2006
  9. Junio C HamanoJun 2, 2006
  10. Junio C HamanoJun 3, 2006
  11. Linus TorvaldsJun 3, 2006
  12. Martin WaitzJun 4, 2006
  13. Junio C HamanoJun 4, 2006
  14. Martin WaitzJun 2, 2006

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.