This is an old question, but for anyone else looking for the answer, most licenses don't require the license to be included *inside* each source file, as long as the license is included *with* the source code. Often this is done by use of a `LICENSE.md` or `LICENSE.txt` file included in the same repo, folder, or directory as the code. Below is a rundown of some common open source licenses and their requirements regarding inclusion in source files. --------------------- ##Apache License Version 2.0 One of the (many) reasons Apache released v2.0 of the [Apache License](https://www.apache.org/licenses/) was: >... to allow the license to be included by reference instead of listed in every file... ([source](http://mail-archives.apache.org/mod_mbox/www-announce/200401.mbox/%[email protected]%3E)) The license's [Appendix](https://www.apache.org/licenses/LICENSE-2.0#apply) seems to specify that a license notice needs to be included in the file itself, but GitHub's [ChooseALicense.com](https://choosealicense.com/licenses/apache-2.0/) says that this requirement is more of a recommendation. --------------------- ##MIT License The [MIT License](https://mit-license.org/) only requires that the license text: >be included in all copies or substantial portions of the Software. ------------------ ##GPL / LGPL / AGPL For the GPL, LGPL, or AGPL license, the Free Software Foundation, which runs [GNU.org](https://www.gnu.org/licenses/gpl-howto.html), *does* want a notice included within each file (as well as in an accompanying `COPYING` file containing the full license text, or `COPYING LESSER` if using the LGPL). Here's how they say to include the license in your source files: >This involves adding two elements to each source file of your program: a copyright notice (such as “Copyright 1999 Terry Jones”), and a statement of copying permission, saying that the program is distributed under the terms of the GNU General Public License (or the Lesser GPL, or the Affero GPL). ---------------------- *Note that I am not a lawyer and this answer does not even remotely constitute any sort of legal advice.*