Re: how to combine two clones in a collection

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

 




On Tue, 10 Jul 2007, martin f krafft wrote:
> 
> I am now ready to move to using git for most of my everyday work,
> but I am still unsure how to tackle one specific aspect of it, for
> which I used svn:externals in the past. I know about git
> subprojects, but these aren't what I want, really.

I really _think_ that what you want is to just use separate branches, if I 
understand correctly. That makes it really easy to just have both lines of 
development (both the "trunk" and your "debian" one) in one git 
repository.

Of course, especially if you want to continue to work the way you probably 
worked with SVN (ie you are used to seeing those two branches as two 
separate directories), that means that while you can (and should) see it 
as a single git project, you'd normally end up just having two copies of 
that project: they'd _both_ have two branches, but they'd just en dup 
having different branches checked out.

Of course, after you get comfy enough with the setup, you might end up 
just deciding that you might as well just switch branches around in a 
single repository (which is what a lot of git users end up doing), but at 
least initially, it's probably easier from a conceptual standpoint to just 
have the two branches checked out in separate copies of the repos.

> With SVN, I would have a directory with two external entries:
> 
>   upstream.trunk svn+ssh://svn.upstream.org/path/to/trunk
>   upstream.trunk/debian svn+ssh://svn.debian.org/svn/pkg/trunk/debian

So in git, you'd have just one "project" with two branches - perhaps just 
called "upstream" and "debian".

Of course, with git, that single "project" can then exist in a distributed 
manner in many different places, and having two copies with different 
branches checked out would just happen to be the one that most closely 
resembles your current situation.

> How can I do this with git? I am aware that maybe the best way would
> be to use git-svn to track the upstream branch remotely and to add
> ./debian in a separate git branch (and to stop using SVN and switch
> to git for ./debian)

I don't think you'd have to stop using SVN. Just continue to track the 
"upstream" branch with git-svn, and then you can merge in the upstream 
into your "debian" branch that also has all the debian-specific stuff.

(And no, I don't know what the standard debian package management setup 
looks like, but I would hope that your extra stuff would be just a few 
files and package descriptions, and obviously any of the local debian 
changes to the project).

		Linus
-
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