Licensing
Why it matters
ImportantCode without a license is legally unusable. Without a license, nobody can reuse, modify, or distribute your work, even if it is publicly visible.
A license is just a text file — LICENSE — in the root of your repository. It tells anyone who finds your code exactly what they are and are not allowed to do with it.
The right choice depends on what you want to allow:
- Can people use it in commercial software?
- Do derivative works need to share the same license?
- Do they need to credit you?
TipData and documentation can (and should) be licensed too! Often,
MIT is used for code + CC BY 4.0 for data.
In Practice
CautionExercises
Let’s add a license to your manuscript repository.
4.1 Create a fork of the manuscript repository, then open it on GitHub
4.2 Use choosealicense.com to select a suitable license
4.3 Using the web interface, add a LICENSE file containing the relevant license text and commit