Re: Can you do this with GIT?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, 27 Jul 2007, CPD wrote:
> 
> We produce variations based on a (mostly) common codebase. In CVS I set up
> "environment" modules for each platform, then when you are working on that
> platform, you simply check out the correct environment and build. Only the
> needed code and tools are exposed in that environment (this is important as
> clients must NOT see each other's code and most customers have some
> customization). I do this by defining and renaming modules in the CVSROOT
> modules file.
> 
> Does GIT support anything like this? Or another way to acheive the same end?

Depending on how big the individual pieces are, you can do it either with 
branches or subprojects.

If the "mostly common" codebase means that 90% of it really ends up being 
common, and what you have is a few config things and perhaps a library or 
two that either shows up or not, git branches would work really well. 

And branches are totally independent of each other, so it's quite possible 
to have even "secret" things in one branch, and it would never get exposed 
to anybody else. The biggest worry you'd need to make sure of is that you 
don't want to merge such private branches directly with each other - since 
then the merged branch would see everything that was in the history of the 
other branch, even if the merge itself ended up not picking the "secret 
stuff".

So with branches that have private information, you'd have to have one 
"common" branch that doesn't have any of the private stuff at all, and do 
the general development on that, and then you can merge that common stuff 
into all the individual private branches (and if you want to go the other 
way, moving something from a private branch to the "common area", you'd 
have to cherry-pick just that particular detail into the common branch).

If you have bigger building blocks, and some of the whole building blocks 
need to be private, you'd probably want to use the subproject support, 
which would make for more of a CVS "modules" kind of thing and in that 
sense perhaps closer to what you do now, but I suspect that just using 
branches would actually end up being much simpler for you. It would depend 
mostly on how big those building blocks that you need to keep separate 
are.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux