If you license your project under GPL, and somebody submits some code (like through a pull request) that ends up in the library you use, you are now also bound by the GPL license, meaning you also have to publish the source of any derivatives.
The way to avoid it is to use something like a CLA, requiring every contributor to sign an agreement giving you special rights to their code, so you can ignore the GPL license in relation to the code they wrote. This works, but is obviously exploitative, taking rights to contributions while giving out less.
It also means if somebody forks the project, you can’t pull in their changes (if you can’t meet GPL terms, of course), unlike with MIT, where by default everybody can make their own versions, public or private, for any purpose.
Though it’s worth noting, if you license your code under MIT, a fork can still add the GPL license on top, which means if you wanted to pull in their changes you’d be bound to both licenses and thus GPL terms. I believe this is also by design in the GPL license, to give open-source an edge, though that can be a bit of a dick move when done to a good project, since it lets the GPL fork pull in changes from MIT versions without giving back to them.
futatorius@lemm.ee 4 days ago
Even then. some employment contracts try to take the piss and claim ownership of anything you produce while you’re employed. Clauses like that are unenforceable in many jurisdictions, but I’ve taken the liberty of redlining them before signing the contract. That means another half-day wating for Legal to look at it, but it’s worth it for the removal of ambiguity about what I intend to do. By the way, I’ve never had an offer withdrawn for doing that.