* Git: Question about specific subtree usage
@ 2014-01-12 0:23 THILLOSEN Andreas
2014-01-12 10:29 ` Torsten Bögershausen
0 siblings, 1 reply; 3+ messages in thread
From: THILLOSEN Andreas @ 2014-01-12 0:23 UTC (permalink / raw)
To: git
Hi,
I have a question about a specific use case for subtrees, but I'm not
sure if is really possible (hence my e-mail, because all my tests failed
so far...)
>From what I have read, subtrees are used mainly to:
- Import inside a working git repository, other git repositories... it's
a little like a symbolic link pointing to another git repository, but
without the burden (it will be the main working git repository that will
handle the unified history);
- Merge many repositories into a single one (after that, they will be
seen as directories linked to the same history);
- Conversely, dispatch branches in a single repository, to make them
distinct repositories;
And now, here is my use case...
I have a big project, which contains many components (each one having,
for the moment, its own directory and repository):
MainLibrary/
MainLibrary-Tests/
Frontend1/
Frontend1-Tests/
Frontend2/
Frontend2-Tests/
MainLibrary contains the heart of the application; all other components
are linked to it when compiling.
For testing purpose, it must be possible to synchronize each component
independently (checking out MainLibrary at a specific tag level, and
checking out MainLibrary-Tests at another commit level for instance).
This is the important point... Each component must have its own history
line, and I must be able to check it out freely and independently from
the other components.
Here would be my dream... Each component would be managed by a subtree,
but ensure that:
- Components are not be tied to a same common branch... but I'm not sure
if it is possible to manage distinct history lines within a same git
history; after creating orphan branches, it becomes impossible to run
most operations like "check out");
- Any new developer would need only one basic operation to get the full
working material: clone one repo, and it's done (it would be awesome,
because in reality, my project is even bigger than my example). It would
spare us many scripting operations...
- Each component can be checked out at any desired level, and so we get
the sources of multiple components simultaneously (so far, using
subtrees or submodules, I had always the same trouble: I could only get
the sources of one component, which was the last I checked out or
activated).
Having a big shared history for all components may slow down some
operations, but it won't be a big problem for the scope of our project.
So... is my use case possible using git-magic? (I hinted subtrees, but
maybe there are better ways?)
Or must I keep my current methodology (one independant repository per
components... so each new developer must clones zillions of things at
the right place...)
Greetings,
Andreas THILLOSEN.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Git: Question about specific subtree usage
2014-01-12 0:23 Git: Question about specific subtree usage THILLOSEN Andreas
@ 2014-01-12 10:29 ` Torsten Bögershausen
2014-01-12 12:18 ` THILLOSEN Andreas
0 siblings, 1 reply; 3+ messages in thread
From: Torsten Bögershausen @ 2014-01-12 10:29 UTC (permalink / raw)
To: THILLOSEN Andreas, git
On 2014-01-12 01.23, THILLOSEN Andreas wrote:
> Hi,
>
> I have a question about a specific use case for subtrees, but I'm not
I feel a little bit confused: Are you talking about git submodules?
And you may want to have a look at the repo tool:
https://code.google.com/p/git-repo/
HTH
/Torsten
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Git: Question about specific subtree usage
2014-01-12 10:29 ` Torsten Bögershausen
@ 2014-01-12 12:18 ` THILLOSEN Andreas
0 siblings, 0 replies; 3+ messages in thread
From: THILLOSEN Andreas @ 2014-01-12 12:18 UTC (permalink / raw)
To: Torsten Bögershausen, git
Well... submodules didn't seem to fit the job, because it seems that the
sources of only one submodule at a time can be checked out.
And in my case, I would need to have the sources of all submodules
simultaneously.
I was talking about subtrees, because I thought it could be a better
tool for this job (and it had the reputation of being less cumbersome
than submodules).
Maybe such a job cannot be done with pure git commands.
Thanks for pointing me this "git-repo" script tool... the description
seems to fit my needs!
I will test it, and hope it will work on Windows (project is
unfortunately very Windows-oriented, for the time being).
Thanks for you help!
Andreas THILLOSEN.
Le 01/12/14 11:29, Torsten Bögershausen a écrit :
> On 2014-01-12 01.23, THILLOSEN Andreas wrote:
>> Hi,
>>
>> I have a question about a specific use case for subtrees, but I'm not
> I feel a little bit confused: Are you talking about git submodules?
>
> And you may want to have a look at the repo tool:
> https://code.google.com/p/git-repo/
>
> HTH
> /Torsten
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-12 11:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-12 0:23 Git: Question about specific subtree usage THILLOSEN Andreas
2014-01-12 10:29 ` Torsten Bögershausen
2014-01-12 12:18 ` THILLOSEN Andreas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).