git-workflow-guide
Solid引導 Git 分支策略、分支命名與合併操作。 Use when: 建立分支、合併、pull request、Git 工作流程相關問題。 Not for: 撰寫 commit message——請用 /commit;推送前的安全檢查——請用 /push。 Keywords: branch, merge, PR, pull request, GitFlow, GitHub Flow, 分支, 合併, 工作流程, 分支命名.
Code & Development 71 stars
13 forks Updated today NOASSERTION
Install
Quality Score: 81/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Git 工作流程指南
> **語言**: [English](../../../../skills/git-workflow-guide/SKILL.md) | 繁體中文
**版本**: 1.0.0
**最後更新**: 2025-12-24
**適用範圍**: Claude Code Skills
---
## 目的
本技能提供 Git 分支策略、分支命名慣例與合併操作的指導。
## 快速參考
### 工作流程策略選擇
| 部署頻率 | 建議策略 |
|---------|---------|
| 每日多次 | Trunk-Based Development |
| 每週至雙週 | GitHub Flow |
| 每月或更長 | GitFlow |
### 分支命名慣例
```
<type>/<short-description>
```
| 類型 | 用途 | 範例 |
|------|------|------|
| `feature/` | 新功能 | `feature/oauth-login` |
| `fix/` 或 `bugfix/` | 錯誤修復 | `fix/memory-leak` |
| `hotfix/` | 緊急生產環境修復 | `hotfix/security-patch` |
| `refactor/` | 程式碼重構 | `refactor/extract-service` |
| `docs/` | 僅文件變更 | `docs/api-reference` |
| `test/` | 測試新增 | `test/integration-tests` |
| `chore/` | 維護任務 | `chore/update-dependencies` |
| `release/` | 發布準備 | `release/v1.2.0` |
### 命名規則
1. **使用小寫**
2. **使用連字號分隔單字**
3. **描述性但簡潔**
## 詳細指南
完整標準請參閱:
- [Git 工作流程策略](./git-workflow.md)
- [分支命名參考](./branch-naming.md)
## 建立分支前檢查清單
建立新分支前:
1. **檢查未合併的分支**
```bash
git branch --no-merged main
```
2. **同步最新程式碼**
```bash
git checkout main
git pull origin main
```
3. **驗證測試通過**
```bash
npm test # 或您專案的測試指令
```
4. **使用正確命名建立分支**
```bash
git checkout -b feature/description
```
## 合併策略快速指南
| 策略 | 使用時機 |
|------|---------|
| **Merge Commit** (`--no-ff`) | 長期功能、GitFlow 發布 |
| **Squash Merge** | 功能分支、乾淨歷史 |
| **Rebase + FF** | Trunk-Based、短期分支 |
## 範例
### 建立功能分支
```bash
# 良好範例
git checkout -b feature/user-authentication
git ...
Details
- Author
- AsiaOstrich
- Repository
- AsiaOstrich/universal-dev-standards
- Created
- 8 months ago
- Last Updated
- today
- Language
- JavaScript
- License
- NOASSERTION
Integrates with
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
git-workflow
Git 分支策略與協作規範:分支命名、PR 模板、Merge 策略選用與 Git Hooks 慣例。當討論分支管理、PR 流程或版本發布時自動套用。
0 Updated yesterday
CloudyWing Code & Development Listed
git-flow-conventions
Git Flow 分支管理与提交规范指南。当用户进行分支操作、合并代码、提交 PR/MR、 规划发版、修复线上 Bug、或询问 Git 协作规范时使用。覆盖完整 Git Flow 模型 (develop/feature/release/hotfix)、分支命名规范、commit message 格式、 PR 提交流程和最佳实践。触发场景包括:创建分支、合并代码、git commit、发版、 hotfix、分支命名、PR 描述、代码审查提交。
0 Updated yesterday
toRolex AI & Automation Listed
git-workflow-decision
当用户要求"开始新任务/创建分支/新建功能"时触发。 按团队规模 + 任务时长判断走哪种 Git 流程:单人短线 / 单人长线 / 多人协作。 禁止默认推送 feat 分支到远程。
1 Updated 1 weeks ago
structure-projects