When I first put a project on GitHub, I skipped the "license" choice because it didn't seem important. Two weeks later someone messaged me: "Can I use your code in my open source project?" I said "sure." He replied: "You don't have a license, I legally can't use it." That day I learned that a license is a condition of sharing, not optional decoration.
Code without a license, even on GitHub, legally has "all rights reserved" status. Meaning nobody can copy it, use it, or fork a piece of it into their project. Many new programmers don't know this. Open source means you gave permission, and permission has to be written down.
There are three most popular options.
The MIT license is the shortest and most liberal. The text is one page. The gist: "Use this code any way you want, share it, modify it, sell it, even put your name on it. Just keep my name in it and don't hold me liable." Any company can take this code and ship it in their product, with no return obligation. React, jQuery, Rails are MIT. If you just want to share your code, MIT is almost always the pick.
GPL (GNU General Public License) is a totally different philosophy. "Use the code, modify it, share it. But if you share it, your version has to be GPL too." This is called "copyleft." If Amazon takes from Linux, it has to release its changes openly. The Linux kernel is under GPL, which is why Microsoft, Google, Amazon all contribute to Linux in various ways. They have no other choice. The philosophy of GPL: "don't close knowledge back up."
Apache 2.0 sits in the middle. Liberal like MIT, but it adds a "patent grant." That means when you use Apache code, you automatically get a license for patents owned by the author of that code. This is critical in corporate environments. Kubernetes, Android, TensorFlow are under Apache. So that a company can't sue you with its own patents after letting you use the code.
Which to pick. Small side project, you want to help someone: MIT. You philosophically believe open source should stay open source: GPL. Writing something close to a large or patent heavy space: Apache 2.0.
The scandals of recent years showed why this choice matters. Elastic switched Elasticsearch from Apache 2.0 to its own "Elastic License" in 2021. Why? Because Amazon was taking it and selling it as a service, and Elastic wasn't getting a cut. The license changed, Amazon forked the code and made OpenSearch. Redis did the same in 2024. HashiCorp did it in 2023. Big companies are increasingly uncomfortable with free use of open source.
The lesson for me: a license isn't just a legal document, it's a declaration of intent. It's the answer to "what can be done with this code." Not worth skipping.

