git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Soffian <jaysoffian@gmail.com>
To: Jeff King <peff@peff.net>
Cc: "Björn Steinbrink" <B.Steinbrink@gmx.de>,
	"Charles Bailey" <charles@hashpling.org>,
	"Caleb Cushing" <xenoterracide@gmail.com>,
	git@vger.kernel.org
Subject: Re: merge, keeping the remote as a new file?
Date: Mon, 2 Mar 2009 08:05:42 -0500	[thread overview]
Message-ID: <76718490903020505j4c4f2df2i379632158f1c80bf@mail.gmail.com> (raw)
In-Reply-To: <20090302070406.GA12937@coredump.intra.peff.net>

On Mon, Mar 2, 2009 at 2:04 AM, Jeff King <peff@peff.net> wrote:
> On Mon, Mar 02, 2009 at 07:59:49AM +0100, Björn Steinbrink wrote:
>
>> Hm, how about this?
>> git checkout --theirs file
>> git mv file newname
>> git checkout HEAD file # Can't use --ours here due to the mv
>
> Actually, you can use --ours if you don't "git mv":
>
>  git checkout --theirs file
>  mv file newfile
>  git checkout --ours file
>  git add file newfile
>
> One more command, but I think more obvious about what is going on (and I
> think both are better than the other suggestions).

This is a superior answer as well because it avoids plumbing in a
situation where plumbing ought not be needed.

j.

      reply	other threads:[~2009-03-02 13:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02  0:16 merge, keeping the remote as a new file? Caleb Cushing
2009-03-02  4:11 ` Jeff King
2009-03-02  6:36   ` Charles Bailey
2009-03-02  6:45     ` Jeff King
2009-03-02  6:59       ` Björn Steinbrink
2009-03-02  7:04         ` Jeff King
2009-03-02 13:05           ` Jay Soffian [this message]

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=76718490903020505j4c4f2df2i379632158f1c80bf@mail.gmail.com \
    --to=jaysoffian@gmail.com \
    --cc=B.Steinbrink@gmx.de \
    --cc=charles@hashpling.org \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=xenoterracide@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).