From b6c5c4182ce3fea0d1b01971ee2dfdcbee2144ec Mon Sep 17 00:00:00 2001 From: ghmark675 Date: Tue, 11 Nov 2025 20:10:10 +0800 Subject: [PATCH] docs: update contributing --- CONTRIBUTING-EN.md | 43 ++++++++++++++++--------------------------- CONTRIBUTING.md | 23 ++++++----------------- 2 files changed, 22 insertions(+), 44 deletions(-) diff --git a/CONTRIBUTING-EN.md b/CONTRIBUTING-EN.md index f17ec40..0598ea9 100644 --- a/CONTRIBUTING-EN.md +++ b/CONTRIBUTING-EN.md @@ -1,65 +1,54 @@ # Contribution Guide -Thank you for contributing to this project! -To maintain code quality and a clean version history, please follow the steps below when submitting your changes. +Thank you for your interest in contributing to this project! +To maintain high code quality and clear version management, please follow the steps below when submitting your changes. # 🪄 How to Submit a Pull Request (PR) ## 1️⃣ Fork the Repository -Fork this repository to your GitHub account. +Fork this repository to your own GitHub account. -## 2️⃣ Clone to Your Local Machine +## 2️⃣ Clone to Local ```bash git clone https://github.com//.git cd ``` -## 3️⃣ Switch to the `dev` Branch (Make Sure You Base Your Work on the Latest Code) - -```bash -git checkout dev -git pull origin dev # Synchronize the latest code from the remote dev branch. -``` - -> ⚠️ Always create your feature branch from **`dev`**, not `main`. - -## 4️⃣ Create a Feature Branch +## 3️⃣ Create a Feature Branch ```bash git checkout -b feature/your-feature-name ``` -> Recommended branch naming conventions: `feature/xxx` or `fix/xxx` for easy identification of features or bug fixes. +> Recommended naming convention: `feature/xxx` or `fix/xxx`, to easily distinguish between new features and bug fixes. -## 5️⃣ Develop and Test +## 4️⃣ Develop and Test * Make your code changes while keeping the project’s coding style consistent. -* Ensure that new features or fixes pass all tests. +* Ensure that all new features or fixes pass the necessary tests. -## 6️⃣ Commit Your Changes +## 5️⃣ Commit Your Changes ```bash git add . git commit -m "type: short description" ``` -> It is recommended to follow [Conventional Commits](https://www.conventionalcommits.org/), keeping the commit history clear. +> It’s recommended to follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification to keep commit history clean and readable. -## 7️⃣ Push to Your Remote Repository +## 6️⃣ Push to Remote ```bash git push origin feature/your-feature-name ``` -## 8️⃣ Open a Pull Request +## 7️⃣ Open a Pull Request -1. Click **New Pull Request** on GitHub. -2. **The target branch must be this repository’s `dev` branch**. +1. On GitHub, click **New Pull Request**. +2. **The target branch must be the `main` branch** of this repository. 3. Fill in the PR description: - * Explain the main changes. - * Link any related issues if applicable. - -> ⚠️ Do **not** target the `main` branch with your PR to avoid affecting the stable mainline. + * Describe the main changes you made. + * If related issues exist, please link them in the PR. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e5e81cf..18bf727 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,16 +16,7 @@ git clone https://github.com/<你的用户名>/<仓库名>.git cd <仓库名> ``` -## 3️⃣ 切换到 `dev` 分支(确保基于最新代码开发) - -```bash -git checkout dev -git pull origin dev # 同步远程 dev 分支的最新代码 -``` - -> ⚠️ 请务必从 **`dev` 分支** 创建你的功能分支,而不是从 `main`。 - -## 4️⃣ 创建功能分支 +## 3️⃣ 创建功能分支 ```bash git checkout -b feature/你的功能名 @@ -33,12 +24,12 @@ git checkout -b feature/你的功能名 > 建议分支命名规范:`feature/xxx` 或 `fix/xxx`,便于识别功能或修复类型。 -## 5️⃣ 开发与测试 +## 4️⃣ 开发与测试 * 进行代码修改,保持项目代码风格一致。 * 确保新增功能或修复通过测试。 -## 6️⃣ 提交修改 +## 5️⃣ 提交修改 ```bash git add . @@ -47,19 +38,17 @@ git commit -m "类型: 简短描述" > 推荐遵循 [Conventional Commits](https://www.conventionalcommits.org/zh-hans/),保持提交记录清晰。 -## 7️⃣ 推送到远程仓库 +## 6️⃣ 推送到远程仓库 ```bash git push origin feature/你的功能名 ``` -## 8️⃣ 发起 Pull Request +## 7️⃣ 发起 Pull Request 1. 在 GitHub 上点击 **New Pull Request**。 -2. **目标分支必须是本仓库的 `dev` 分支**。 +2. **目标分支必须是本仓库的 `main` 分支**。 3. 填写 PR 描述: * 说明主要改动内容 * 如有相关 issue,请在 PR 中关联 - -> ⚠️ PR **绝对不要指向 `main` 分支**,避免影响主线稳定性。