ghmark675

docs: update contributing

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