常用开源许可证、.gitignore、项目初始化模板集合,用于快速初始化规范 Git 仓库。
在仓库根目录运行以下命令:
# 生成 Go 语言的 .gitignore 文件
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/gitignore.sh | bash -s go > .gitignore
# 生成 Node.js 项目的 .gitignore 文件
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/gitignore.sh | bash -s node > .gitignore
# 生成 Python 项目的 .gitignore 文件
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/gitignore.sh | bash -s python > .gitignore
在仓库根目录运行以下命令:
# MIT 许可证(默认作者:wangzhiqiang,当前年份:自动获取)
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s mit > LICENSE
# Apache 2.0 许可证(默认作者:wangzhiqiang,当前年份:自动获取)
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s apache-2 > LICENSE
# AGPL 3.0 许可证(默认作者:wangzhiqiang,当前年份:自动获取)
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s agpl-3 > LICENSE
# BSD 2-clause 许可证(默认作者:wangzhiqiang,当前年份:自动获取)
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s bsd-2 > LICENSE
# BSD 3-clause 许可证(默认作者:wangzhiqiang,当前年份:自动获取)
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s bsd-3 > LICENSE
# BSL 1.0 许可证
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s bsl-1 > LICENSE
# CC0 1.0 许可证
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s cc0-1 > LICENSE
# EPL 2.0 许可证
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s epl-2 > LICENSE
# GPL 2.0 许可证(默认作者:wangzhiqiang,当前年份:自动获取)
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s gpl-2 > LICENSE
# GPL 3.0 许可证(默认作者:wangzhiqiang,当前年份:自动获取)
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s gpl-3 > LICENSE
# LGPL 2.1 许可证
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s lgpl-2 > LICENSE
# MPL 2.0 许可证
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s mpl-2 > LICENSE
# UNLICENSE 许可证
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s unlicense > LICENSE
# 使用环境变量设置作者(推荐方式)
export REPO_AUTHOR="Your Name"
curl -sSL https://cnb.cool/zhiqiangwang/cnb/repos/-/git/raw/main/licenses.sh | bash -s mit > LICENSE
欢迎贡献新的 .gitignore 模板或许可证模板。请按照现有文件的格式添加新内容。
本项目采用 Apache 2.0 许可证。