git 如何在 Github 更改项目的许可证?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20243214/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 17:23:13  来源:igfitidea点击:

How to change the license for a project at Github?

gitapigithublicensing

提问by Chris

I have created a simple list APIin Cand I want to release it via Github.

我创建了一个简单的列表APIC,我想通过将其释放Github

Is there any way to change the license after the creation of the repository?

创建存储库后有什么方法可以更改许可证吗?

回答by Pierre Arlaud

If you release it with a license, you allow people to use it as the licence describes. You can't just say "no I changed my mind I don't want it to be under GPL". Of course your future release may be in another licence (except that the GPL forces modified versions to be GPL too).

如果您使用许可证发布它,则您允许人们按照许可证所述使用它。你不能只是说“不,我改变了主意,我不希望它在 GPL 之下”。当然,您未来的版本可能会采用另一个许可证(除了 GPL 强制修改后的版本也是 GPL)。

Amendment

修正案

Websites like choosealicense.commay help you to choose a suitable license. The license pickerprovides some templates that can be committed to your repository; for an existing repository you can bring it back this way:

choosealicense.com这样的网站可以帮助您选择合适的许可证。该许可证选择器提供了一些模板,可以被提交到你的资料库; 对于现有存储库,您可以通过以下方式将其恢复:

  • browse to your repository at GitHub.com
  • create a new file by pressing the blue +icon (updated to: New Filebutton)
  • name it LICENSE.mdor LICENSE.txtto show up the license picker again
  • choose a template
  • GitHub.com 上浏览到您的存储库
  • 按蓝色+图标创建一个新文件(更新为:新建文件按钮)
  • 命名LICENSE.mdLICENSE.txt再次显示许可证选择器
  • 选择一个模板