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

Re: Redoing a merge for a particular file

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 8, 2011, 00:36 UTC
Message-ID
<7vaacphale.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAFOYHZCFetkokgtn4z0O3nPTEy6GCTEcN0Pzc8ce-joqMzZM1Q@mail.gmail.com>
Chris Packham <judge.packham@gmail.com> writes:
Show 15 quoted lines
>   $ git merge topic
>   Auto-merging foo.c
>   CONFLICT (content): Merge conflict in foo.c
>   Auto-merging bar.c
>   CONFLICT (content): bar.c
>   Auto-merging otherfile1.c
>   Auto-merging otherfile2.c
>   Auto-merging otherfile3.c
>   Resolved 'foo.c' using previous resolution.
>   Resolved 'bar.c' using previous resolution.
>   Automatic merge failed; fix conflicts and then commit the result.
>   $ git mergetool
>   No files need merging
>
> So rerere has remembered the bad resolution of foo.c.
I would do this:
 $ git rerere forget foo.c
 $ git checkout -m foo.c
then fix it up and
 $ git add foo.c
 $ git commit
Previous: Junio C Hamano
Message 5 of 5 in “Redoing a merge for a particular file”
  1. Chris PackhamJul 7, 2011
  2. Jeff KingJul 7, 2011
  3. Chris PackhamJul 7, 2011
  4. Junio C HamanoJul 8, 2011
  5. Junio C HamanoJul 8, 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.