If I have a project, licensed under terms similar to CC BY-NC-SA. It is not open source by definition, as no commercial use is allowed. I can of course put it on GitHub, and make the source code open to the public. If I am the only copyright holder there is no problem. However, what about if there are public contributions?
In detail, my question is, if there is a way to
- use license terms to make sure any contribution made to this repo would imply acceptance of the code to be licensed under the same non-open source license; or
- use license terms to make sure any contribution made to this repo would imply an unconditional, solely transfer of copyright to the project owner; or
- use signed statement/agreement upon contribution to achieve the above purpose.
Note that the scope of this question is about legal feasibility. It does not involve 'whether anyone would be like to be such a contributor' or 'if such practice is good or bad in terms of business or community'.