License in Repository
Every product should be covered by a license. It is your creative work, you own it, and you should decide what other people can or cannot do with it.
Why Adding a License to Your Repository is Important
When you publish your source code repository, make sure to include a license. Your code is your creative work, and like most creative works, it needs copyright protection. There is basic copyright protection automatically granted to all original works, however software licenses can specify conditions of use for your product. You might need some special conditions that should be clear for future users of your software. A license specifies terms on which software may be used, modified, or distributed.
What if I do not include a license in my repository?
Failure to add a license to your repository, creates legal uncertainty. Potential users of your software do not understand if they have permission to use the software and, therefore, might choose not to use your product. On the other hand, some users might get the impression that you do not have the product legally covered and so they can do whatever they want to do with it.
If you create a new project on GitHub and do not add any license terms, the project is protected by copyright and is by default "All Rights Reserved”. However, it is unclear if it has any legal effect in any jurisdiction. To avoid future issues, pick a license that covers your needs and add it to your repository.
Why You Might Want to Add a Licence to Your Repository
Correctly chosen license (see the most popular licenses at Choose a License or consult with a lawyer) can help you with:
- Deciding what people are allowed to do with your product
- Setting formal permissions for using the product
- Adding value to your product
- Generating revenue from the guarantee and royalty payments
- Supporting your marketing
- Maintaining control over your product
Problems that Adding a License to Your Repository Solves
- Poor code quality
- "Not my problem" mentality
- Meaningless work
- Unhappy or uncertain clients
- Knowledge hoarding
How to Add a License to Your Repository
A license is typically a .txt file named LICENSE placed in the base directory of the depository. You can use a GitHub interface to add the license to your project.
Follow these steps to add a license to your repository:
- Open your repository in GitHub.
- Select "Create a new file". A pop-up window appears. Select “Text file”.
- Name the text file. Typically “LICENSE.md”. (We recommend using upper case for the file name).
- Open the license text file, and add the text of your license. Tip: pick an open-source license here: Choose a License and simply copy+paste the text.
- Commit the license to your repository.
You can also mention the license or add a link to the license in your README file.
Common Pitfalls of Adding a License to Your Repository
There can be a few pitfalls of using a license. You can avoid them by choosing the right license for your product.
- Unclear royalty terms
- Excessively complex conditions
- Lack of information
- Inadequate termination rights
Resources for Licenses in Repositories
- SW Carpentry: Licensing
- Choose a License:Choose an open source license
- Licensing International: What is Licensing
- Open Source Initiative: Licenses & Standards
Want to write for DXKB?
Feel free to contribute. People from DXKB community will be more than happy.
Related articles
ALL ARTICLES
README
A README is a text file that contains important information about the product. It is the first thing the user sees in the directory of the product. It helps the user to understand what does the product do and how to use it.
Read moreSoftware Documentation
Software documentation explains how the product works or how to use it. Different types of software documentation are created through the whole product development lifecycle.
Read moreUser Stories
In an Agile environment, teamwork is divided into small pieces called User Stories. It helps with sprint planning. They are written in a basic language.
Read moreDocumentation Testing
Documentation testing is a process of improving your existing documentation through feedback. Understanding how to get feedback is crucial for building good documentation and positive developer experience.
Read moreOperations Logbook
Operations Logbook allows you to collect, store, and share data in real time and dig your historical data easily. Record every incident and every important event related to your project.
Read moreALL ARTICLES