Suppose I fork a software with 1000 files licensed under the MIT License.

There's only a LICENSE file in the root of the project (no MIT License notice at the beginning of the files).

Now, if I add other 1000 files and want to relicense the whole software under another License, how can I keep the proper attribution?

Should I create an MIT License snippet, fill it with the original author's name, and paste on top of each one of the original thousand of files? Or what?

And what if, instead of adding a brand new file, I modify one of the original ones? Should I put the old license notice, the new license notice, both the license notices and the name of both authors?

2 Answers 2


There is no strict rule of where you have to place copyright notices, you just need to make an effort to keep it clear that this piece of code is covered by this license and not try and misrepresent it as your work. While it is common to place the copyright at the top of every file it is not required.

As the original project does not place the copyright at the top of every file, I wouldn't change every file just to add it. I would keep the external project files separated so that it is as clear as possible that these files are MIT licensed and copyrighted by xxx.

  - main.c
  - lib.c
  - LICENSE  <-- this is your project license and copyright
  + extern
    + proj2  <- everything in here is covered by the included license file
      - LICENSE     not your license above
      - lib.c
  • 1
    Sounds fine. Anything about a modified file? May 13, 2018 at 10:46
  • 1
    @AndreaLigios if you modify one of the files I would add a header in the file stating that portions are copyrighted by you. You choose whether the file or the version control defines what part is yours.
    – sambler
    May 14, 2018 at 17:16

The MIT license reads

subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

It belongs in the files it covers which includes modified files. Your license would apply to the files you've created. MIT license is compatible with some other licenses, such as GPL, so those could coexist in the same file, but this is not true of all licenses.

  • 1
    This does not answer clearly to any of the two questions: 1) should I edit every file in order to add a license notice? 2) If I modify an existing file, could I relicense it under another license? May 11, 2018 at 14:24
  • 1
    You can add a license to a file, but only if that license is compatible with MIT. Every file covered by MIT should have the MIT license in it if you're going to have different licenses for other different files. May 11, 2018 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.