Hi Thomas,

Am 2012-10-09 12:35, schrieb Thomas Ferris Nicolaisen:
A branch in Git is uusally a branch of *what is the main contents of the 
not some arbitrary content. As I said above, submodules were invented for this 
to avoid filling up your own repositories with things that don't really belong 

Hmmm... I understand what you say, but regarding convention / purpose / philosophy, I'm still confused:

In http://happygiraffe.net/blog/2008/02/07/vendor-branches-in-git/, would you say that his "upstream" branch has some arbitrary content? I see that this is a "generic" use of branches, unlike the way in which branches are normally used, but to me this looks like a clever, straightforward, and above all a very simple technique that needs no extras.
Personally, for these reasons, I find it very appealing.

(Especially as our external libraries are all lightweight and considered closely related to the main project.)

Submodules, in contrast, are described as problematic in each book that I've read so far (and there are many internet resources in the same spirit), and seem mostly suited, as you say, for things that don't belong there.

As I mentioned in my previous post (http://article.gmane.org/gmane.comp.version-control.git.user/3493), I can see how submodules are a natural fit for a library that is huge in size, has an incompatible license or otherwise restricted distribution terms compared to the core project, and/or that we don't ever intend to modify.

I'm happy to stand corrected, but at the moment, the happygiraffe.net approach looks a lot simpler and more attractive than submodules to me.

That said, I imagine that your model should work. It's like having permanent
feature-branches, which are never updated with the development in master.

Well, yes, it's a shift in perspective, different from what branches are 
usually used for.
One way to see it is that "vendor" is the true "master" (as in "the basis", or "the source"), and the usual "master" is just a branch of it. ;-)
Still feels very natural and in no way like misuse of branches to me.

My personal favorite term, instead of "vendor", is "pristine" branch, but that's maybe because I'm not a native English speaker. ;-)

So, I imagine the following.

You first clone  the *cafu* repository. Inside *cafu* you get subdirectories 
ExtLibs/lua, ExtLibs/zlib and so on.

You then clone each of the vendor repositories,

Why "each"?
I could as well clone "vendor" as a whole, couldn't I?

and transform them into having the
structure you want. See the man page for filter-branch, there's an example for 
"/To move
the whole tree into a subdirectory/".

Ahh!! Thank you very much!
That was the crucial step that I was missing before!

Is this a line of thought you have tried out in practice?

I didn't try it before, because I didn't know how to move a whole tree into a 

But I'll try now, and report how it went. With the hand-work involved, it will probably take me a few days to finish, though.

A thousand thanks for your help!

Best regards,

   Cafu - the open-source Game and Graphics Engine
for multiplayer, cross-platform, real-time 3D Action
          Learn more at http://www.cafu.de

You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to