Re: [PATCH] user-manual: Talk about tracking third-party snapshots

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

 



On Tue, 13 Nov 2007, Junio C Hamano wrote:

> > +$ git checkout master
> > +$ git merge --strategy=ours \
> > +    -m "Tie old v1.1 into our history by merging with strategy=ours." \
> > +    v1.1

> This would work only when your 'master' happens to be at v1.1
> (and identical to it) isn't it?
> 
> People would want to know "But my 'master' is _not_ at v1.1 but
> is _based_ on v1.1.  How would I handle that case?"

That was actually my case - my master was based on v1.1. The command 
worked for me - I was able to merge in v1.2 from Git afterward - but maybe 
I just got lucky, so I'd be interested to know the right thing to do.

I think --strategy=ours just leaves the files as is on master and creates 
a merge commit with two parents: master and v1.1. So anything between v1.1 
and v1.2, on the upstream branch, is fair game to be merged next time.

So, say I started with this:

---------------
old snapshot branch: snap-v1.0---snap-v1.1
                       \           \
master:                 o---o---o---o--o-o

new Git upstream: o--o-v1.0-o-o-o-o-o-o-v1.1-o-o-v1.2
---------------

I could make the merge with --strategy=ours:
---------------
old snapshot branch: snap-v1.0---snap-v1.1
                       \           \
master:                 o---o---o---o--o-o--o
                                           /
new Git upstream: o--o-v1.0-o-o-o-o-o-o-v1.1-o-o-v1.2
---------------


Then I'd free to merge in v1.2:
---------------
master:                 o---o---o---o--o-o--o------o
                                           /      /
new Git upstream: o--o-v1.0-o-o-o-o-o-o-v1.1-o-o-v1.2
---------------

Hmm, looks like a toothbrush. But is it right?

Mike
-
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]

  Powered by Linux