Re: git branch --switch?

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

 



On 4/17/07, Rene Herman <rene.herman@xxxxxxxxx> wrote:
On 04/17/2007 05:55 PM, Lars Hjemli wrote:
> I might have misunderstood your goal, but have you tried
>
> git clone -l -s -n <a local linux repo> local
> git branch a v2.6.20
> git branch b a
> git branch c a
>
> Now a, b and c all point at v2.6.20, while HEAD points as master.

Well, yes, they do, and I could also do

git branch b v2.6.20
git branch c v2.6.20

directly then (right?)

Yes


but I do want that "v20" branch in the middle. The
cloned repo is a linus repo, and that v20 is where I'll be pulling 2.6.20.y
updates into; a merge branch will then merge v20, a, b and c into what I
will be compiling.

Ok. Then maybe you want to try something like this:

$ git clone -l -s -n ../linux-2.6 rene
$ cd rene
$ git remote add v20
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.20.y
$ git fetch v20

This gives you a tracking branch for 2.6.20.y, named as "v20/master".
That branch can then be used as a starting point for your a, b and c
branches, like:

$ git checkout -b a v20/master    # this _will_ take some time...

After applying some changes on branch a, you can then merge the latest
changes on the v20-branch like this

$ git fetch v20
$ git merge v20/master

If you want the merge to occur on a separate branch, do this first:

$ git checkout -b tmp a


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