logo
0
0
WeChat Login
refactor: 简化 gitignore.sh 逻辑,直接拼接 URL 下载对应模板

repos

常用开源许可证、.gitignore、项目初始化模板集合,用于快速初始化规范 Git 仓库。

使用方法

生成 .gitignore 文件

在仓库根目录运行以下命令:

# 生成 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 模板

  • Go
  • Node.js

支持的许可证

  • MIT
  • Apache 2.0
  • AGPL 3.0
  • BSD 2-clause
  • BSD 3-clause
  • BSL 1.0
  • CC0 1.0
  • EPL 2.0
  • GPL 2.0
  • GPL 3.0
  • LGPL 2.1
  • MPL 2.0
  • UNLICENSE

贡献

欢迎贡献新的 .gitignore 模板或许可证模板。请按照现有文件的格式添加新内容。

许可证

本项目采用 Apache 2.0 许可证。

About

常用开源许可证、.gitignore、项目初始化模板集合,用于快速初始化规范 Git 仓库。

348.00 KiB
0 forks0 stars1 branches0 TagREADMEApache-2.0 license
Language
Shell16.2%
Others83.8%