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
    Dec 9, 2014 at 14:10
  • 1
    Submodules 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
    Dec 9, 2014 at 14:21
  • 1
    This 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
    Dec 9, 2014 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.