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

Re: how to do "git merge --abort"

From
Jeff King <peff@peff.net>
Date
Aug 21, 2009, 15:37 UTC
Message-ID
<20090821153730.GA14456@coredump.intra.peff.net>
In-Reply-To
<200908211726.21593.trast@student.ethz.ch>
On Fri, Aug 21, 2009 at 05:26:19PM +0200, Thomas Rast wrote:
> > It is spelled "git reset --merge" (though --merge was introduced in
> > v1.6.1; prior to that, you had to use "git reset --hard").
> 
> Umm, no, you still have to use "git reset --hard".

Ah, sorry, you are right. I have never actually used "--merge", but I knew based on this thread:

  http://article.gmane.org/gmane.comp.version-control.git/102067

that the point was to carry dirty state across a reset. So I assumed you could use it to reset a failed merge while leaving dirty state in files unrelated to the merge. But it doesn't actually handle unmerged entries at all.

Thanks for correcting me.

The downside, of course, of "git reset --hard" is that it kills off any dirty state you may have wanted to keep.

-Peff
Previous: Thomas RastNext: bill lam
Message 4 of 5 in “how to do "git merge --abort"”
  1. bill lamAug 21, 2009
  2. Jeff KingAug 21, 2009
  3. Thomas RastAug 21, 2009
  4. Jeff KingAug 21, 2009
  5. bill lamAug 22, 2009

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.