I want to gather several sub-projects in a single GitHub repo for the convenience of the users. But I wonder if it's actually possible to have folders in a single repo each of which is covered by a different license (all of them are BSD-license variants, with small differences), or do I need to split the project into multiple repos?
1 Answer 1
If a licence file exists, it's rather natural to assume it applies to the folder (and its subfolders), so you can have a licence in each subproject folder and all is well.
Other than that, you could have the license in each file and thus even change between licences on a per-file basis.
Beyond that, I would point out that you could also have a repo for each project and then just add them as submodules to the "convenience" project (personally I find that more convenient, because I also have the possibility to clone just the part that interests me).
Lastly, if this is about convenience, then don't overdo it. Especially try to avoid variants. When I see a project, where I see clearly "this part is GPL, that part is MIT", then that's acceptable. But if I have to deal with a jungle of licences and custom variants of them, I'll probably just go look some place else or just write the part I need myself. Programmers love to reinvent the wheel. Don't give them excuses to do that ;)
-
How would I add external repos as submodules for the "convenience" project? Can one link repos in GitHub?introiboad– introiboad12/09/2014 14:10:01Commented Dec 9, 2014 at 14:10
-
1Submodules are a git feature and have nothing to do with GitHub, although GitHub handles them pretty well, e.g. the libs folder here is actually a submodule. To learn more about submodule, this should get you started: stackoverflow.com/questions/5252450/…back2dos– back2dos12/09/2014 14:21:42Commented Dec 9, 2014 at 14:21
-
1This Question was neither github-specific nor git-specific since they have both nothing to do with your licences, back2dos clarified this. Your comment, also, wasn't github-specific since github just gives you a place to host your git repository. Google for "git submodule" and you should find a link to the git-book on git-scm.com which teaches you what submodules are and how to work with them.tkausl– tkausl12/09/2014 14:24:34Commented Dec 9, 2014 at 14:24