init-project
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInit Project Workflow
新项目初始化工作流
Set up a new project with proper structure from day one.
从第一天起就搭建具有合理结构的新项目。
Steps
步骤
- Gather requirements
- What language / framework?
- Project name?
- Public or private repo?
- Any CI/CD requirements?
- Create repo
gh repo create <name> --public/--private --clone
cd <name>- Set up project structure
- Create standard directories (src, tests, docs as needed)
- Add appropriate for the language
.gitignore - Add with project name and one-line description
README.md - Add license file if specified
- Set up tooling
- Package manager config (,
package.json,pyproject.toml, etc.)Cargo.toml - Linter / formatter config if applicable
- Test framework setup
- Set up CI (if requested)
- GitHub Actions workflow for test + lint on PR
- Keep it minimal — can be extended later
- First commit
git add -A
git commit -m "chore: initial project setup"
git push -u origin main- 收集需求
- 使用什么语言/框架?
- 项目名称是什么?
- 仓库是公开还是私有?
- 有任何CI/CD需求吗?
- 创建仓库
gh repo create <name> --public/--private --clone
cd <name>- 搭建项目结构
- 创建标准目录(按需创建src、tests、docs)
- 添加适用于对应语言的文件
.gitignore - 添加包含项目名称和一行描述的
README.md - 如有要求则添加许可证文件
- 配置工具
- 包管理器配置文件(、
package.json、pyproject.toml等)Cargo.toml - 如适用则添加代码检查/格式化工具配置
- 搭建测试框架
- 配置CI(如有需求)
- 用于PR时执行测试+代码检查的GitHub Actions工作流
- 保持最简配置——后续可扩展
- 首次提交
git add -A
git commit -m "chore: initial project setup"
git push -u origin mainRules
规则
- Ask before adding anything beyond the basics
- Don't over-engineer the initial setup — start minimal
- Always include and
.gitignoreREADME.md - Test that the project builds/runs before committing
- 添加基础内容之外的任何项前需先询问
- 初始搭建不要过度设计——从最简开始
- 务必包含和
.gitignoreREADME.md - 提交前测试项目是否能构建/运行