git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: layer <layer@known.net>
To: Elijah Newren <newren@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: need help with git show :1:...
Date: Wed, 08 Apr 2009 11:35:33 -0700	[thread overview]
Message-ID: <7685.1239215733@relay.known.net> (raw)
In-Reply-To: <51419b2c0904081125u3bdf37deyd5dd85f6c2a6d7cc@mail.gmail.com>

Elijah Newren <newren@gmail.com> 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.

  reply	other threads:[~2009-04-08 18:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-08 17:41 need help with git show :1: layer
2009-04-08 17:58 ` Elijah Newren
2009-04-08 18:02   ` layer
2009-04-08 18:07     ` Elijah Newren
2009-04-08 18:10       ` layer
2009-04-08 18:25         ` Elijah Newren
2009-04-08 18:35           ` layer [this message]
2009-04-08 18:38             ` Elijah Newren
  -- strict thread matches above, loose matches on Subject: below --
2009-04-08 17:57 layer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7685.1239215733@relay.known.net \
    --to=layer@known.net \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).