Committed by
666ghj
docs: add bilingual CONTRIBUTING.md (Chinese + English)
- Added a CONTRIBUTING.md with both Chinese and English versions. - Provides clear instructions for contributing based on the dev branch.
Showing
2 changed files
with
128 additions
and
0 deletions
CONTRIBUTING-EN.md
0 → 100644
| 1 | +# Contribution Guide | ||
| 2 | + | ||
| 3 | +Thank you for contributing to this project! | ||
| 4 | +To maintain code quality and a clean version history, please follow the steps below when submitting your changes. | ||
| 5 | + | ||
| 6 | +# 🪄 How to Submit a Pull Request (PR) | ||
| 7 | + | ||
| 8 | +## 1️⃣ Fork the Repository | ||
| 9 | + | ||
| 10 | +Fork this repository to your GitHub account. | ||
| 11 | + | ||
| 12 | +## 2️⃣ Clone to Your Local Machine | ||
| 13 | + | ||
| 14 | +```bash | ||
| 15 | +git clone https://github.com/<your-username>/<repository-name>.git | ||
| 16 | +cd <repository-name> | ||
| 17 | +``` | ||
| 18 | + | ||
| 19 | +## 3️⃣ Switch to the `dev` Branch (Make Sure You Base Your Work on the Latest Code) | ||
| 20 | + | ||
| 21 | +```bash | ||
| 22 | +git checkout dev | ||
| 23 | +``` | ||
| 24 | + | ||
| 25 | +> ⚠️ Always create your feature branch from **`dev`**, not `main`. | ||
| 26 | + | ||
| 27 | +## 4️⃣ Create a Feature Branch | ||
| 28 | + | ||
| 29 | +```bash | ||
| 30 | +git checkout -b feature/your-feature-name | ||
| 31 | +``` | ||
| 32 | + | ||
| 33 | +> Recommended branch naming conventions: `feature/xxx` or `fix/xxx` for easy identification of features or bug fixes. | ||
| 34 | + | ||
| 35 | +## 5️⃣ Develop and Test | ||
| 36 | + | ||
| 37 | +* Make your code changes while keeping the project’s coding style consistent. | ||
| 38 | +* Ensure that new features or fixes pass all tests. | ||
| 39 | + | ||
| 40 | +## 6️⃣ Commit Your Changes | ||
| 41 | + | ||
| 42 | +```bash | ||
| 43 | +git add . | ||
| 44 | +git commit -m "type: short description" | ||
| 45 | +``` | ||
| 46 | + | ||
| 47 | +> It is recommended to follow [Conventional Commits](https://www.conventionalcommits.org/), keeping the commit history clear. | ||
| 48 | + | ||
| 49 | +## 7️⃣ Push to Your Remote Repository | ||
| 50 | + | ||
| 51 | +```bash | ||
| 52 | +git push origin feature/your-feature-name | ||
| 53 | +``` | ||
| 54 | + | ||
| 55 | +## 8️⃣ Open a Pull Request | ||
| 56 | + | ||
| 57 | +1. Click **New Pull Request** on GitHub. | ||
| 58 | +2. **The target branch must be this repository’s `dev` branch**. | ||
| 59 | +3. Fill in the PR description: | ||
| 60 | + | ||
| 61 | + * Explain the main changes. | ||
| 62 | + * Link any related issues if applicable. | ||
| 63 | + | ||
| 64 | +> ⚠️ Do **not** target the `main` branch with your PR to avoid affecting the stable mainline. |
CONTRIBUTING.md
0 → 100644
| 1 | +# 贡献指南 | ||
| 2 | + | ||
| 3 | +感谢你愿意为本项目做出贡献! | ||
| 4 | +为了保持代码质量和版本管理的清晰,请按照以下步骤提交你的修改。 | ||
| 5 | + | ||
| 6 | +# 🪄 提交 Pull Request(PR)步骤 | ||
| 7 | + | ||
| 8 | +## 1️⃣ Fork 仓库 | ||
| 9 | + | ||
| 10 | +将本仓库 Fork 到你的 GitHub 账户。 | ||
| 11 | + | ||
| 12 | +## 2️⃣ 克隆到本地 | ||
| 13 | + | ||
| 14 | +```bash | ||
| 15 | +git clone https://github.com/<你的用户名>/<仓库名>.git | ||
| 16 | +cd <仓库名> | ||
| 17 | +``` | ||
| 18 | + | ||
| 19 | +## 3️⃣ 切换到 `dev` 分支(确保基于最新代码开发) | ||
| 20 | + | ||
| 21 | +```bash | ||
| 22 | +git checkout dev | ||
| 23 | +``` | ||
| 24 | + | ||
| 25 | +> ⚠️ 请务必从 **`dev` 分支** 创建你的功能分支,而不是从 `main`。 | ||
| 26 | + | ||
| 27 | +## 4️⃣ 创建功能分支 | ||
| 28 | + | ||
| 29 | +```bash | ||
| 30 | +git checkout -b feature/你的功能名 | ||
| 31 | +``` | ||
| 32 | + | ||
| 33 | +> 建议分支命名规范:`feature/xxx` 或 `fix/xxx`,便于识别功能或修复类型。 | ||
| 34 | + | ||
| 35 | +## 5️⃣ 开发与测试 | ||
| 36 | + | ||
| 37 | +* 进行代码修改,保持项目代码风格一致。 | ||
| 38 | +* 确保新增功能或修复通过测试。 | ||
| 39 | + | ||
| 40 | +## 6️⃣ 提交修改 | ||
| 41 | + | ||
| 42 | +```bash | ||
| 43 | +git add . | ||
| 44 | +git commit -m "类型: 简短描述" | ||
| 45 | +``` | ||
| 46 | + | ||
| 47 | +> 推荐遵循 [Conventional Commits](https://www.conventionalcommits.org/zh-hans/),保持提交记录清晰。 | ||
| 48 | + | ||
| 49 | +## 7️⃣ 推送到远程仓库 | ||
| 50 | + | ||
| 51 | +```bash | ||
| 52 | +git push origin feature/你的功能名 | ||
| 53 | +``` | ||
| 54 | + | ||
| 55 | +## 8️⃣ 发起 Pull Request | ||
| 56 | + | ||
| 57 | +1. 在 GitHub 上点击 **New Pull Request**。 | ||
| 58 | +2. **目标分支必须是本仓库的 `dev` 分支**。 | ||
| 59 | +3. 填写 PR 描述: | ||
| 60 | + | ||
| 61 | + * 说明主要改动内容 | ||
| 62 | + * 如有相关 issue,请在 PR 中关联 | ||
| 63 | + | ||
| 64 | +> ⚠️ PR **绝对不要指向 `main` 分支**,避免影响主线稳定性。 |
-
Please register or login to post a comment