Re: How to migrate folders using svn:externals exclusively (no actual data inside folder) to git submodules?

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

 



Jensen Somers venit, vidit, dixit 14.05.2010 20:53:
> Hello,
> 
> Having used Git a couple of times on some open source projects I am
> beginning to be more and more convinced of the power and benefit it
> has over subversion. One of the major benefits for me is the
> possibility to create local branches - and thus work on several things
> at the same time - without interfering with the actual master
> repository or to have 10 different /trunk folders on my hard drive.
> 
> Where I work we currently use subversion but I am looking into
> migrating everything to Git. There is one thing that is not very clear
> to me though and I hope somebody could shine some light on the matter.
> 
> Our current repository is set up as follows:
> /
> + /Modules
> + + /ModuleA
> + + /ModuleB
> + + /ModuleC
> + /Applications
> + + /ApplicationA
> + + /ApplicationB
> + /Views
> + + /ViewApplicationA
> + + /ViewApplicationB
> 

When I switched from svn to git, the first thing I needed to do was to
"think small": Don't use one big repo for vaguely related things - use
many small ones. You see, in git it's so simple to create one, it
doesn't even hurt!

I don't think Views, Applications and Modules belong in the same repo here.

> ViewApplicationA and ViewApplicationB are empty folders which use the
> svn:externals property to include all required folders. For
> ViewApplicationA this would for example be ApplicationA, ModuleA and
> ModuleC, for ViewApplicationB this would be ApplicationB, ModuleB and
> ModuleC. Using the views the developers are able to checkout only
> what's needed for the given project they work on.
> And this is where Git confuses me. As an alternative for svn:externals
> I stumbled upon Git submodules but I am not entirely sure they allow
> me to do the same thing. Can I create a sub folder on my root Git
> repository and let developers check out only that folder or do I need
> to create a separate repository per view and reference another
> repository (holding all actual data) as a submodule? And can I
> actually do that on the server? Most examples I found talk about
> cloning another repository as a submodule, but all of them seem to do
> it locally, and not on the server and I don't want to bother every
> developer doing all that every time he decides to start fresh.

Are your Modules interrelated, are your Applications interrelated enough
so that it makes sense you have branches ModuleX in a repo Modules etc.?
If not you may just have one repo per Module and per Application.

Views are a candidate for submodules referencing the Application and
Module repos they need.

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