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

Re: re-running merge on a single file

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 12, 2010, 06:56 UTC
Message-ID
<7viq92rpsr.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4B99E309.2070603@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 10 quoted lines
> Chris Packham schrieb:
>> $ git checkout --merge -- cpu/mpc83xx/start.S
>> $ git show :1:$(git rev-parse --show-prefix)cpu/mpc83xx/start.S
>> fatal: Path 'cpu/mpc83xx/start.S' is in the index, but not at stage 1.
>> Did you mean ':0:cpu/mpc83xx/start.S'?
>
> Both of these work only as long as the index still records the conflicted
> state. If you (or one of your tools) has git-added the file, or you have
> git-checked-out some version of the file, the conflict stages are lost,
> and you must reset --hard and redo the entire merge.

If the merge textually autoresolves cleanly, you might not even have any conflicted state to begin with. In such a case you would need to grab

	MERGE_HEAD:path-to-that-thing
        HEAD:path-to-that-thing
yourself.
Previous: Johannes SixtNext: Chris Packham
Message 8 of 14 in “re-running merge on a single file”
  1. Chris PackhamMar 11, 2010
  2. Chris PackhamMar 11, 2010
  3. Markus HeidelbergMar 11, 2010
  4. Chris PackhamMar 11, 2010
  5. Jakub NarebskiMar 11, 2010
  6. Chris PackhamMar 12, 2010
  7. Johannes SixtMar 12, 2010
  8. Junio C HamanoMar 12, 2010
  9. Chris PackhamMar 12, 2010
  10. Chris PackhamMar 12, 2010
  11. Junio C HamanoMar 12, 2010
  12. Chris PackhamMar 12, 2010
  13. Kris ShannonMar 14, 2010
  14. Jakub NarebskiMar 12, 2010

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.