Re: How to selectively recreate merge state?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jay Soffian <jaysoffian@xxxxxxxxx> writes:

> Let's say you initiate a merge:
>
> $ git merge topic
>
> And this merge results in conflicts in two files, foo and bar. You
> resolve the conflicts in both files, but then decide you don't like
> how you resolved bar.
>
> How do you set the index and working-copy back to the state it was
> immediately after doing the merge for bar, while leaving the merge
> resolution alone for foo?

Before you "git add bar", you can say "git checkout --conflict=merge bar"
(or --conflict=diff3).

After "git add bar", you can't.  Save what you have resolved so far in a
separate file (e.g. "cp foo foo.resolved"), reset to the previous state
and redo the merge.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]