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-thingyourself.