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

Re: [PATCH] Documentation: warn against merging in a dirty tree

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 16, 2008, 00:06 UTC
Message-ID
<7vprn57y45.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<32541b130809151653w27d7876fp35e0967d597ae2a9@mail.gmail.com>
"Avery Pennarun" <apenwarr@gmail.com> writes:
> But how do you abort a *failed* merge in a situation like Linus's
> example?  "git reset --hard HEAD" would destroy the unstaged Makefile
> change.

"All of your work tree changes are easily reproducible" implies you do not mind losing them, Ok?

Also "git reset HEAD" (that is, without --hard) would not touch the work tree changes. You need to remove the work-tree cruft left by new files yourself, if you go this route, though. New files are rare enough so it may be more appropriate (and you can "git clean -n $that_subdirectory" to enumerate them).

It all depends on your workflow.
Previous: Avery PennarunNext: Linus Torvalds
Message 6 of 17 in “[IRC/patches] Failed octopus merge does not clean up”
  1. Thomas RastSep 15, 2008
  2. Add test that checks octopus merge cleanupThomas Rast, Sep 15, 2008
  3. Documentation: warn against merging in a dirty treeThomas Rast, Sep 15, 2008
  4. Junio C HamanoSep 15, 2008
  5. Avery PennarunSep 15, 2008
  6. Junio C HamanoSep 16, 2008
  7. Linus TorvaldsSep 18, 2008
  8. Avery PennarunSep 18, 2008
  9. Junio C HamanoSep 19, 2008
  10. Junio C HamanoSep 15, 2008
  11. Thomas RastSep 15, 2008
  12. Junio C HamanoSep 16, 2008
  13. Jakub NarebskiSep 16, 2008
  14. Andreas EricssonSep 17, 2008
  15. Jakub NarebskiSep 17, 2008
  16. Miklos VajnaSep 17, 2008
  17. Andreas EricssonSep 17, 2008

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.