{"thread":{"id":"34569","subject":"Help using git subtree","startedAt":"2013-07-30T09:32:22Z","lastAt":"2013-07-31T06:57:03Z","messageCount":3,"participants":["Gabriel Jover","Fredrik Gustafsson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"224290","messageId":"51F78826.1040502@cells.es","threadId":"34569","inReplyTo":null,"subject":"Help using git subtree","fromName":"Gabriel Jover","fromEmail":"gjover@cells.es","sentAt":"2013-07-30T09:32:22Z","receivedAt":"2013-07-30T09:32:22Z","isPatch":false,"sender":{"key":"gjover@cells.es","avatar":null},"body":"Dear all,\n\nI am trying to avoid using git submodules and thus I am testing if git \nsubtree fit my needs.\nI have a set of sub-projects linked to a main-project.\n\nGit subtree is very convenient to get all the sub-projects into the \nmain-project directory tree\nand to send back sub-project commits to the corresponding repository.\nBut I don't understand the work flow very well.\n\nI can add a subtree with a given prefix and pull/push my commits to the \nrepository,\nbut how do I do to pull/push commits from the main-project to the \ncorresponding repository\navoiding sub-projects to be sent?\n\nAn other question I have is when will be subtree included in git packages.\nI had to compile git from sources in order to get this feature.\n\nSincerely,\n\nG. Jover-Manas\n\n-- \n+----------------------------------------------------+\n  Gabriel V. Jover Mañas\n  Computing Division\n  Cells / Alba Synchrotron  [http:/www.cells.es]\n  Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3\n  E-08290 Cerdanyola del Valles (Barcelona), Spain\n  E-mail: gjover@cells.es\n  Phone: +34 93 592 4471\n  Office: ALBA P0 Of8/18\n+----------------------------------------------------+\n\nSi heu rebut aquest correu per error, us informo que pot contenir informació confidencial i privada i que està prohibit el seu ús. Us agrairiem que ho comuniqueu al remitent i l'elimineu. Gràcies.\nSi ha recibido este correo por error, le informo de que puede contener información confidencial  y privada y que está prohibido su uso. Le agradeceré que lo comunique a su remitente y lo elimine. Gracias.\nIf you have received  this e-mail by error, please note that it may contain confidential and private  information, therefore, the use of this information is strictly forbidden. Please inform the sender of the error and delete the information received. Thank you.\n"},{"id":"224291","messageId":"20130730095846.GA19369@paksenarrion.iveqy.com","threadId":"34569","inReplyTo":"51F78826.1040502@cells.es","subject":"Re: Help using git subtree","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2013-07-30T09:58:46Z","receivedAt":"2013-07-30T09:58:46Z","isPatch":false,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"On Tue, Jul 30, 2013 at 11:32:22AM +0200, Gabriel Jover wrote:\n> Dear all,\n> \n> I am trying to avoid using git submodules and thus I am testing if\n> git subtree fit my needs.\n> I have a set of sub-projects linked to a main-project.\n\nJust out of curiosity, why are you trying to avoid submodules?\n\n> \n> Git subtree is very convenient to get all the sub-projects into the\n> main-project directory tree\n> and to send back sub-project commits to the corresponding repository.\n> But I don't understand the work flow very well.\n\nI haven't used subtree that much however how do you commit to upstream?\nAFAIK every commit to the subtree must be done in the subtree branch and\nthen merged back to the \"superproject\"-branch with a subtree merge.\n\n> \n> I can add a subtree with a given prefix and pull/push my commits to\n> the repository,\n> but how do I do to pull/push commits from the main-project to the\n> corresponding repository\n> avoiding sub-projects to be sent?\n\nYou don't. A subtree is a subtree in your git-repo and is therefore a\npart of your repository. When you're using subtree that project will be\na part of you project.\n\n> \n> An other question I have is when will be subtree included in git packages.\n> I had to compile git from sources in order to get this feature.\n> \n\ngit-subtree is a part of git, located in the contrib section. When your\nsoftware distribution choose to distribute that with your git-package\nis not up to the git project to decide but something you need to ask\nyour package maintainer.\n\nIf you're asking when git-subtree will move from contrib/ to core git, I\ndon't know. That's a decision for Junio. I would argue that it shouldn't\nbecause submodules can do everything that subtrees are good at and\ngit.git should focus on doing one solution well instead of doing the\nsame thing in two bad ways. However since git.git already uses a\nsubtree-like style for gitk, git-gui, etc.  it doesn't seem like Junio\nagrees with me on this point.\n\n> \n> Si heu rebut aquest correu per error, us informo que pot contenir informació confidencial i privada i que està prohibit el seu ús. Us agrairiem que ho comuniqueu al remitent i l'elimineu. Gràcies.\n> Si ha recibido este correo por error, le informo de que puede contener información confidencial  y privada y que está prohibido su uso. Le agradeceré que lo comunique a su remitente y lo elimine. Gracias.\n> If you have received  this e-mail by error, please note that it may contain confidential and private  information, therefore, the use of this information is strictly forbidden. Please inform the sender of the error and delete the information received. Thank you.\n\nIs this really something to have in e-mails to a public list? Some lists\nwon't accept this type of e-mails, or simply just ignore you.\n\n-- \nMed vänliga hälsningar\nFredrik Gustafsson\n\ntel: 0733-608274\ne-post: iveqy@iveqy.com\n"},{"id":"224332","messageId":"51F8B53F.7030602@cells.es","threadId":"34569","inReplyTo":"20130730095846.GA19369@paksenarrion.iveqy.com","subject":"Re: Help using git subtree","fromName":"Gabriel Jover","fromEmail":"gjover@cells.es","sentAt":"2013-07-31T06:57:03Z","receivedAt":"2013-07-31T06:57:03Z","isPatch":false,"sender":{"key":"gjover@cells.es","avatar":null},"body":"Al 30/07/13 11:58, En/na Fredrik Gustafsson ha escrit:\n\n>> Git subtree is very convenient to get all the sub-projects into the\n>> main-project directory tree\n>> and to send back sub-project commits to the corresponding repository.\n>> But I don't understand the work flow very well.\n> I haven't used subtree that much however how do you commit to upstream?\n> AFAIK every commit to the subtree must be done in the subtree branch and\n> then merged back to the \"superproject\"-branch with a subtree merge.\nI use \"git subtree pull\" and \"git subtree push\".\nAFAIK with subtree all commits are in the same repository, thus one does \nnot need\nto go to the subtree branch to commit. This is one of the advantages of \nsubtree.\n\n>> I can add a subtree with a given prefix and pull/push my commits to\n>> the repository,\n>> but how do I do to pull/push commits from the main-project to the\n>> corresponding repository\n>> avoiding sub-projects to be sent?\n> You don't. A subtree is a subtree in your git-repo and is therefore a\n> part of your repository. When you're using subtree that project will be\n> a part of you project.\nI expected that there would be a way to split the main project and push it,\nin the same way that one can split one subtree and push it.\nIf not, this could be a feature request.\n\n>> An other question I have is when will be subtree included in git packages.\n>> I had to compile git from sources in order to get this feature.\n>>\n> If you're asking when git-subtree will move from contrib/ to core git, I\n> don't know. That's a decision for Junio. I would argue that it shouldn't\n> because submodules can do everything that subtrees are good at and\n> git.git should focus on doing one solution well instead of doing the\n> same thing in two bad ways. However since git.git already uses a\n> subtree-like style for gitk, git-gui, etc.  it doesn't seem like Junio\n> agrees with me on this point.\nRight, I rephrase: When git-subtree will move from contrib/ to core git?\n\nLet me also empathize that I find git-subtree much more convenient than \nsub-modules.\nOne can work with a single repository as it were a single project, one \ncan commit changes\nthat affect different sub-projects with just one command, use common \ntags and branches and so on.\n\n>> Si heu rebut aquest correu per error, us informo que pot contenir informació confidencial i privada i que està prohibit el seu ús. Us agrairiem que ho comuniqueu al remitent i l'elimineu. Gràcies.\n>> Si ha recibido este correo por error, le informo de que puede contener información confidencial  y privada y que está prohibido su uso. Le agradeceré que lo comunique a su remitente y lo elimine. Gracias.\n>> If you have received  this e-mail by error, please note that it may contain confidential and private  information, therefore, the use of this information is strictly forbidden. Please inform the sender of the error and delete the information received. Thank you.\n> Is this really something to have in e-mails to a public list? Some lists\n> won't accept this type of e-mails, or simply just ignore you.\n>\nDon't worry about this signature, it only applies if one receives this \ne-mail by mistake.\n\nBest regards,\n\nGabriel\n\n-- \n\n\nSi heu rebut aquest correu per error, us informo que pot contenir informació confidencial i privada i que està prohibit el seu ús. Us agrairiem que ho comuniqueu al remitent i l'elimineu. Gràcies.\nSi ha recibido este correo por error, le informo de que puede contener información confidencial  y privada y que está prohibido su uso. Le agradeceré que lo comunique a su remitente y lo elimine. Gracias.\nIf you have received  this e-mail by error, please note that it may contain confidential and private  information, therefore, the use of this information is strictly forbidden. Please inform the sender of the error and delete the information received. Thank you.\n"}]}