I'm quite new to Git: I come from SVN and there I found really powerfull the :external feature. Here in Git I haven't find something similar:
- submodules are perfect for adding project modules that are not always required. They must be initialized after the repo cloning and you can't include only a subdir of the original project.
- subtrees are really good for adding libraries (they also allow subdir inclusion), but pushing them is a real pain.
So the scenario is this: I have a project, in which I want to include some libraries. I want the possibility to change all these libraries and pushing them in their own repos. Moreover some of this libraries are subdirs of bigger projects (for example if a project includes also demos or readme files, I won't include those dirs in my project).
How can I do that?
I've tried:
- http://progit.org/book/ch6-7.html + http://posterous.timocracy.com/git-sub-tree-merging-back-to-the-subtree-for (merging only a subdir isn't allowed, or I can't just see it);
- http://www.tipstank.com/2011/02/21/git-subtree-notes-and-workflows/ (same as above, do not handle subdir inclusion);
- http://psionides.eu/2010/02/04/sharing-code-between-projects-with-git-subtree/ (can't see nothing about pushing);
- http://h2ik.co/2011/03/having-fun-with-git-subtree/ (can't see nothing about pushing)
Well, if you've reached this point, thanks for your patience, now I'd like something else to try, because right now my conclusion is: "subtree pushing isn't allowed in Git" ç_ç