Say, if I found one of the packages in my project adopted GPL license, and I already had published my repository to GitHub as MIT, I immediately have to;

  1. delete the whole repository.
  2. change the license to GPL.
  3. remove the dependency to maintain MIT license.
  4. No way. I'll be sued for it someday.

Which would be possible choices?


I didn't know the example above is okay. So let me change the assumption.

If I found one of my JS, CSS, HTML or other stuff had been brought from MIT licensed source and I had never put the copyright notice in the file, I have to;

  1. delete the whole repository.
  2. remove the file or substitute another file for it.
  3. No way.
  • There is no general problem with you licensing your work under MIT, even if you include GPL components. See e.g. Can library that took parts of library licensed under GPL with Classpath Exception be licensed under MIT?
    – Brandin
    Feb 16, 2018 at 12:36
  • Oh I didn't know they are compatible. I referred the example just to explain there's a problem in licensing... I edited the example.
    – kemakino
    Feb 16, 2018 at 13:02
  • 2
    If you discover something is missing (license notice), what is wrong with just modifying the file and adding the needed information? If you published the repository publicly along with all commits, in theory someone could go back and get the prior commit that doesn't have this information, but you have to evaluate the risk of this against your options: In most cases, just fix the problem and ignore past commits; if it's critical, use git rebase to squash that commit; if all else fails, the nuclear option is to completely delete the repository.
    – Brandin
    Feb 16, 2018 at 13:46

1 Answer 1


If you find out that you are not fulfilling the obligations that a third-party license puts on you, then you should correct that as soon as possible.

If copyright and/or license information is missing or incorrect, you should update those files so that they contain the correct copyright and license information.

If a third-party dependency, which is not copied into your repository, changes its license to one that is incompatible to your license, then you should first try to pin that dependency to the last (tested) version before the license change.
After that, you can take your time to consider if you can replace that dependency with something that does have a compatible license or if you want to change the license on your project (which can only be done with explicit approval of all contributors).

In any case, these actions show that you are serious about copyright licenses and that you don't try to take advantage of someone's code. Should they try to sue anyway, that will probably be looked upon favorably by the courts.

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.