git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 'Theirs' merge between branches on a binary file.
@ 2008-12-22 20:56 Tim Visher
  2008-12-22 21:11 ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Tim Visher @ 2008-12-22 20:56 UTC (permalink / raw)
  To: git

Hello Everyone,

I have a binary file that is coming up with a merge conflict
(obviously) between two branches and I want to simply say, 'take their
version of the file'.  Is this possible?  In subversion it's a pretty
trivial merge operation, so I assume there's something similar in git.

Thanks in advance!

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 'Theirs' merge between branches on a binary file.
  2008-12-22 20:56 'Theirs' merge between branches on a binary file Tim Visher
@ 2008-12-22 21:11 ` Junio C Hamano
  2008-12-22 21:16   ` Tim Visher
  0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2008-12-22 21:11 UTC (permalink / raw)
  To: Tim Visher; +Cc: git

"Tim Visher" <tim.visher@gmail.com> writes:

> I have a binary file that is coming up with a merge conflict
> (obviously) between two branches and I want to simply say, 'take their
> version of the file'.

Do you mean during a conflicted merge resolution you would want to check
their version out of the index and declare that it is the merge result?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 'Theirs' merge between branches on a binary file.
  2008-12-22 21:11 ` Junio C Hamano
@ 2008-12-22 21:16   ` Tim Visher
  2008-12-22 22:52     ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Tim Visher @ 2008-12-22 21:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Mon, Dec 22, 2008 at 4:11 PM, Junio C Hamano <gitster@pobox.com> wrote:

> Do you mean during a conflicted merge resolution you would want to check
> their version out of the index and declare that it is the merge result?

Sure.  Let me try to be a bit clearer.

I was developing on a feature branch and now want to merge back into
the master branch.  Unfortunately, a binary file somewhat central to
the development effort was changed between the the feature branch and
the master branch and now there is a conflict.  Obviously, I can't fix
the conflict via markers or something like that because it's a binary
file, and I know that I want the feature branch's version of the file,
not the one that it is in conflict with.  How would I just select the
stage3 version of the file and add that to the index?

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 'Theirs' merge between branches on a binary file.
  2008-12-22 21:16   ` Tim Visher
@ 2008-12-22 22:52     ` Junio C Hamano
  2008-12-22 22:58       ` Tim Visher
  0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2008-12-22 22:52 UTC (permalink / raw)
  To: Tim Visher; +Cc: git

"Tim Visher" <tim.visher@gmail.com> writes:

> On Mon, Dec 22, 2008 at 4:11 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
>> Do you mean during a conflicted merge resolution you would want to check
>> their version out of the index and declare that it is the merge result?
>
> Sure.

That sounds like "git checkout --theirs"...

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 'Theirs' merge between branches on a binary file.
  2008-12-22 22:52     ` Junio C Hamano
@ 2008-12-22 22:58       ` Tim Visher
  2008-12-22 23:18         ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Tim Visher @ 2008-12-22 22:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Mon, Dec 22, 2008 at 5:52 PM, Junio C Hamano <gitster@pobox.com> wrote:

> That sounds like "git checkout --theirs"...

I'm sorry, Junio.  I don't mean to be dense but I can't find that in
the docs and when I execute it it comes back as an unknown command.
Perhaps you could just point me to the relevant man page?  This seems
like such a fundamental operation, I just don't understand why there
isn't something like a `git resolve`.

Thanks for your help!

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 'Theirs' merge between branches on a binary file.
  2008-12-22 22:58       ` Tim Visher
@ 2008-12-22 23:18         ` Junio C Hamano
  2008-12-23 14:05           ` Tim Visher
  0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2008-12-22 23:18 UTC (permalink / raw)
  To: Tim Visher; +Cc: git

"Tim Visher" <tim.visher@gmail.com> writes:

> On Mon, Dec 22, 2008 at 5:52 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
>> That sounds like "git checkout --theirs"...
>
> I'm sorry, Junio.  I don't mean to be dense but I can't find that in
> the docs and when I execute it it comes back as an unknown command.

Hmph, I meant to point you at:

    http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html

I think you can use "git checkout-index --stage=3 path" if your git is
older than that one with the option.

v1.6.0.1-15-g38901a4 (checkout --ours/--theirs: allow checking out one
side of a conflicting merge, 2008-08-30) introduced the feature.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 'Theirs' merge between branches on a binary file.
  2008-12-22 23:18         ` Junio C Hamano
@ 2008-12-23 14:05           ` Tim Visher
  2008-12-23 18:31             ` René Scharfe
  0 siblings, 1 reply; 9+ messages in thread
From: Tim Visher @ 2008-12-23 14:05 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Mon, Dec 22, 2008 at 6:18 PM, Junio C Hamano <gitster@pobox.com> wrote:

> Hmph, I meant to point you at:
>
>    http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html

Ah, yes.  There it is. :)

> I think you can use "git checkout-index --stage=3 path" if your git is
> older than that one with the option.
>
> v1.6.0.1-15-g38901a4 (checkout --ours/--theirs: allow checking out one
> side of a conflicting merge, 2008-08-30) introduced the feature.

Apparently this was added, at least to the docs, only in the latest
release?  That's kind of weird A) because the tag indicates 1.6.0.1,
not 0.6, and B) It's a pretty trivial operation in other VCSes.
Hmm... Maybe I'll try to updated the docs to make this feature a
little more visible.

Anyway, the checkout-index command does indeed work in the older
version.  That's kind of what I was looking for.  I'm now working on
compiling git under cygwin as the latest version cygwin installs for
you is 0.4!

Thanks for your help!

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 'Theirs' merge between branches on a binary file.
  2008-12-23 14:05           ` Tim Visher
@ 2008-12-23 18:31             ` René Scharfe
  2008-12-28 17:14               ` Tim Visher
  0 siblings, 1 reply; 9+ messages in thread
From: René Scharfe @ 2008-12-23 18:31 UTC (permalink / raw)
  To: Tim Visher; +Cc: Junio C Hamano, git

Tim Visher schrieb:
> I'm now working on
> compiling git under cygwin as the latest version cygwin installs for
> you is 0.4!

Have you seen msysgit (http://code.google.com/p/msysgit/), the easy
route to git on Windows?  It has all you need to check out and compile
the latest version of git.

René

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: 'Theirs' merge between branches on a binary file.
  2008-12-23 18:31             ` René Scharfe
@ 2008-12-28 17:14               ` Tim Visher
  0 siblings, 0 replies; 9+ messages in thread
From: Tim Visher @ 2008-12-28 17:14 UTC (permalink / raw)
  To: René Scharfe; +Cc: Junio C Hamano, git

On Tue, Dec 23, 2008 at 1:31 PM, René Scharfe
<rene.scharfe@lsrfire.ath.cx> wrote:

> Have you seen msysgit (http://code.google.com/p/msysgit/), the easy
> route to git on Windows?  It has all you need to check out and compile
> the latest version of git.

I have seen msysgit.  I haven't spent too much time with it mainly
because I'm in denial that I have to work with Windows all day at
work.  I'm going to have to look into it I think when I attempt to get
my team onto git in a little less than a month.

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-12-28 17:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-22 20:56 'Theirs' merge between branches on a binary file Tim Visher
2008-12-22 21:11 ` Junio C Hamano
2008-12-22 21:16   ` Tim Visher
2008-12-22 22:52     ` Junio C Hamano
2008-12-22 22:58       ` Tim Visher
2008-12-22 23:18         ` Junio C Hamano
2008-12-23 14:05           ` Tim Visher
2008-12-23 18:31             ` René Scharfe
2008-12-28 17:14               ` Tim Visher

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