Re: need help with git show :1:...

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

 



Elijah Newren <newren@xxxxxxxxx> wrote:

>> > How can I redo the merge for just this file?  Is that possible?  I
>> > think I'd definitely like to start over on *just this one file*.
>> 
>> Well, someone else probably knows a clever way to do this.  I don't,
>> but the following may help:
>> 
>> MERGE_REF=$(cat .git/MERGE_HEAD)
>> git show HEAD:src/c/sock.c > current-sock
>> git show $MERGE_REF:src/c/sock.c > other-sock
>> git show $(git merge-base $MERGE_REF HEAD):src/c/sock.c > base-sock
>> git merge-file current-sock other-sock base-sock

Did you mean this?

  git merge-file current-sock base-sock other-sock

The man page seems to indicate that.

>> That'll redo the three way merge on src/c/sock.c (assuming no renames
>> or other special cases happened) and store the result in current-sock.
>>  You can then edit that file and when ready, move the result over
>> src/c/sock.c.

Thanks.  This is a big help.
--
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]