{"thread":{"id":"35641","subject":"Git: Question about specific subtree usage","startedAt":"2014-01-12T00:23:24Z","lastAt":"2014-01-12T12:18:16Z","messageCount":3,"participants":["THILLOSEN Andreas","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"233027","messageId":"52D1E07C.1010403@free.fr","threadId":"35641","inReplyTo":null,"subject":"Git: Question about specific subtree usage","fromName":"THILLOSEN Andreas","fromEmail":"thillosen@free.fr","sentAt":"2014-01-12T00:23:24Z","receivedAt":"2014-01-12T00:23:24Z","isPatch":false,"sender":{"key":"thillosen@free.fr","avatar":null},"body":"Hi,\n\nI have a question about a specific use case for subtrees, but I'm not\nsure if is really possible (hence my e-mail, because all my tests failed\nso far...)\n\n>From what I have read, subtrees are used mainly to:\n- Import inside a working git repository, other git repositories... it's\na little like a symbolic link pointing to another git repository, but\nwithout the burden (it will be the main working git repository that will\nhandle the unified history);\n- Merge many repositories into a single one (after that, they will be\nseen as directories linked to the same history);\n- Conversely, dispatch branches in a single repository, to make them\ndistinct repositories;\n\nAnd now, here is my use case...\n\nI have a big project, which contains many components (each one having,\nfor the moment, its own directory and repository):\nMainLibrary/\nMainLibrary-Tests/\nFrontend1/\nFrontend1-Tests/\nFrontend2/\nFrontend2-Tests/\n\nMainLibrary contains the heart of the application; all other components\nare linked to it when compiling.\nFor testing purpose, it must be possible to synchronize each component\nindependently (checking out MainLibrary at a specific tag level, and\nchecking out MainLibrary-Tests at another commit level for instance).\nThis is the important point... Each component must have its own history\nline, and I must be able to check it out freely and independently from\nthe other components.\n\nHere would be my dream... Each component would be managed by a subtree,\nbut ensure that:\n\n- Components are not be tied to a same common branch... but I'm not sure\nif it is possible to manage distinct history lines within a same git\nhistory; after creating orphan branches, it becomes impossible to run\nmost operations like \"check out\");\n- Any new developer would need only one basic operation to get the full\nworking material: clone one repo, and it's done (it would be awesome,\nbecause in reality, my project is even bigger than my example). It would\nspare us many scripting operations...\n- Each component can be checked out at any desired level, and so we get\nthe sources of multiple components simultaneously (so far, using\nsubtrees or submodules, I had always the same trouble: I could only get\nthe sources of one component, which was the last I checked out or\nactivated).\n\nHaving a big shared history for all components may slow down some\noperations, but it won't be a big problem for the scope of our project.\nSo... is my use case possible using git-magic? (I hinted subtrees, but\nmaybe there are better ways?)\nOr must I keep my current methodology (one independant repository per\ncomponents... so each new developer must clones zillions of things at\nthe right place...)\n\nGreetings,\n\nAndreas THILLOSEN.\n"},{"id":"233030","messageId":"52D26E7A.8080003@web.de","threadId":"35641","inReplyTo":"52D1E07C.1010403@free.fr","subject":"Re: Git: Question about specific subtree usage","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2014-01-12T10:29:14Z","receivedAt":"2014-01-12T10:29:14Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2014-01-12 01.23, THILLOSEN Andreas wrote:\n> Hi,\n> \n> I have a question about a specific use case for subtrees, but I'm not\nI feel a little bit confused: Are you talking about git submodules?\n\nAnd you may want to have a look at the repo tool:\nhttps://code.google.com/p/git-repo/\n\nHTH\n/Torsten\n"},{"id":"233038","messageId":"52D28808.9010001@free.fr","threadId":"35641","inReplyTo":"52D26E7A.8080003@web.de","subject":"Re: Git: Question about specific subtree usage","fromName":"THILLOSEN Andreas","fromEmail":"thillosen@free.fr","sentAt":"2014-01-12T12:18:16Z","receivedAt":"2014-01-12T12:18:16Z","isPatch":false,"sender":{"key":"thillosen@free.fr","avatar":null},"body":"Well... submodules didn't seem to fit the job, because it seems that the\nsources of only one submodule at a time can be checked out.\nAnd in my case, I would need to have the sources of all submodules\nsimultaneously.\nI was talking about subtrees, because I thought it could be a better\ntool for this job (and it had the reputation of being less cumbersome\nthan submodules).\n\nMaybe such a job cannot be done with pure git commands.\nThanks for pointing me this \"git-repo\" script tool... the description\nseems to fit my needs!\nI will test it, and hope it will work on Windows (project is\nunfortunately very Windows-oriented, for the time being).\n\nThanks for you help!\n\nAndreas THILLOSEN.\n\n\nLe 01/12/14 11:29, Torsten Bögershausen a écrit :\n> On 2014-01-12 01.23, THILLOSEN Andreas wrote:\n>> Hi,\n>>\n>> I have a question about a specific use case for subtrees, but I'm not\n> I feel a little bit confused: Are you talking about git submodules?\n>\n> And you may want to have a look at the repo tool:\n> https://code.google.com/p/git-repo/\n>\n> HTH\n> /Torsten\n>\n>\n>\n>\n"}]}