Learn how to add a license to your GitHub project step-by-step: choose a license, create a LICENSE file, add your license text, commit changes, and verify on GitHub.
Book a call with an Expert
Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.
Step 1: Choose a License
Start by selecting a license that matches how you want others to use, modify, and distribute your project. Common choices include MIT, Apache 2.0, and GPLv3.
Step 2: Create a LICENSE File
You need a file named LICENSE
(no extension) in your project root. You can add it via the GitHub web interface or your local machine.
LICENSE
as the filename.touch LICENSE
Step 3: Add License Content
Copy the full text of your chosen license into the LICENSE
file. Replace placeholders (e.g., year, author name) as needed.
MIT License
Copyright (c) 2023 Your Name
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction…
LICENSE
in your text editor and save changes.
Step 4: Commit and Push Your Changes
Make sure the new LICENSE
file is tracked and then push it to GitHub.
git add LICENSE
git commit -m "Add MIT license"
git push origin main
main
if your default branch has a different name.
Step 5: Verify the License on GitHub
Once pushed, GitHub automatically recognizes standard license files.
When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.