« Git/Sous-modules et Super-projets » : différence entre les versions

Contenu supprimé Contenu ajouté
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 1 :
{{git}}
 
Le '''super-projet''' est un concept apparu avec Git depuis v1.5.3, ayant pour but de mieux gérer de nombreux dépôts, en distinguant ceux qui sont hors du super-projet, de ceux à l'intérieur que l'on appelle les sous-modules.
 
== Super-projets ==
The currently terminology distinguishes a ''git repository'' outside of a superproject from one inside by calling the one inside a '''submodule'''. If consistency will help you grok this chapter, you can think of either a ''submodule'' as a ''subproject,'' or a ''superproject'' as a ''supermodule.'' It really doesn't make too much sense why either of these terms would have a ''sub-'' or ''super-'' prefix without their alternative; nonetheless, that's how the official Git documentation will refer to them.
 
The only git application specific to the submodule/superproject functionality is '''git-submodule'''.
 
== Superprojects ==
A '''Superproject''', is simply a git repository. To create a superproject, simply ''git init'' any directory, and ''git submodule add'' all of the git archives you wish to include. A quick aside, you can not currently ''git submodule add'' git repositories that are direct children within the same directory.{{ref|lie_parent}}
 
Ligne 19 ⟶ 15 :
When someone pulls down the superproject, they will see a series of empty folders for each submodule. They can then ''git submodule init'' all of those that they wish to utilize.
 
== SubmodulesSous-modules ==
A ''git archive'' is said to become a ''submodule'' the second after you execute ''git submodule add'' in another git repository.