Files
star-erp/.agents/workflows/now-push.md
sky121113 e4c83ebd6d
All checks were successful
ERP-Deploy-Demo / deploy-demo (push) Successful in 58s
ERP-Deploy-Production / deploy-production (push) Successful in 57s
[DOCS] 優化 now-push 工作流:新增 main 分支從 demo 分支合併之規範提醒
2026-03-05 16:59:46 +08:00

35 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: 將目前的變更提交並推送至指定的遠端分支 (遵守專案規範)
---
# 快速推送工作流 (now-push)
本工作流旨在規範化 Git 提交與推送流程,確保符合專案的開發規範 (繁體中文、規範前綴) 與發布紀律 (Release Window)。
## 執行步驟
1. **檢查變更內容**
執行 `git status``git diff` 檢查目前的工作目錄,確保提交內容正確。
2. **撰寫規格化提交訊息 (Commit Message)**
- 訊息一律使用 **繁體中文 (台灣用語)**
- 必須使用以下前綴之一:
- `[FIX]`:修復 Bug。
- `[FEAT]`:新增功能。
- `[DOCS]`:文件更新。
- `[STYLE]`UI/樣式/格式調整。
- `[REFACTOR]`:程式碼重構。
- 描述應具體且真實反映修改內容。
3. **目標分支安全檢查 (Release Window & Source Check)**
- 若使用者指定的目標分支包含 **`main`**
- **來源檢查**:根據規範,上線 `main` 前必須先確保程式碼已在 `demo` 分支驗證完畢。我會優先檢查 `demo``main` 的差異,並提醒使用者應從 `demo` 合併。
- **檢查目前時間**:標準發布時段為 **週一至週四 12:00 (中午) 之前**
- 若在非標準時段(週五、週末、下班時間),**必須** 先攔截並主動提醒風險,取得使用者明確書面同意(例如:「我確定現在要上線」)後方才執行推送。
4. **執行推送 (Push)**
- 依據指令帶入的分支名稱執行推送。
- 範例:`git push origin [目前分支]:[目標分支]`
5. **同步關聯分支**
- 若為 `main` 的 Hotfix修復後應評估是否同步回 `demo``dev` 分支。