git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* How to migrate folders using svn:externals exclusively (no actual  data inside folder) to git submodules?
@ 2010-05-14 18:53 Jensen Somers
  2010-05-14 19:17 ` Michael J Gruber
  0 siblings, 1 reply; 2+ messages in thread
From: Jensen Somers @ 2010-05-14 18:53 UTC (permalink / raw
  To: git

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

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.

Any tips, pointers, links to websites and other help to clarify this
is greatly appreciated.

- Jensen

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

* Re: How to migrate folders using svn:externals exclusively (no actual data inside folder) to git submodules?
  2010-05-14 18:53 How to migrate folders using svn:externals exclusively (no actual data inside folder) to git submodules? Jensen Somers
@ 2010-05-14 19:17 ` Michael J Gruber
  0 siblings, 0 replies; 2+ messages in thread
From: Michael J Gruber @ 2010-05-14 19:17 UTC (permalink / raw
  To: Jensen Somers; +Cc: git

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

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

end of thread, other threads:[~2010-05-14 19:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-14 18:53 How to migrate folders using svn:externals exclusively (no actual data inside folder) to git submodules? Jensen Somers
2010-05-14 19:17 ` Michael J Gruber

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).