git-workflow

A set of Git rules for organizing code changes. Git is a tool for tracking versions of files, and branches are separate lines of work that can later be merged.

In plain words
What is it for?
Use it when creating feature, bug-fix, release, or emergency branches; writing commits; and preparing or reviewing pull requests.
Why use it?
It gives a team shared names for branches, a standard format for commit messages, and a defined pull-request process, reducing confusion during collaborative development.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/zenobia0000/cursor-agentic-coding-template/git-workflow
Clone the repo
git clone --depth 1 https://github.com/Zenobia0000/cursor-agentic-coding-template

Made for: Cursor.

Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,407 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.02407
Opus 5 $0.00009 $0.01203
Sonnet 5 $0.00003 $0.00481
Haiku 4.5 $0.00002 $0.00241

Measured yesterday against content hash ba5c50d7c1c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to git-workflow — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/process/git-workflow.mdc · 369 lines

How it starts

The opening of the file, as written. The whole thing — 369 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🌊 Git 分支策略

主要分支

main (master)     ← 生產環境 (protected)
  ↑
develop          ← 開發整合 (protected)
  ↑
feature/*        ← 功能開發
hotfix/*         ← 緊急修復
release/*        ← 版本發布

分支命名規範

feature/ticket-number-short-description
# feature/JIRA-123-user-authentication

hotfix/issue-description
# hotfix/critical-login-bug

release/version-number
# release/v1.2.0

bugfix/ticket-number-description
# bugfix/JIRA-456-fix-payment-error

📝 Commit 規範

Conventional Commits 格式

<type>(<scope>): <subject>

<body>

<footer>

Type 類別

feat:     新功能
fix:      修復 bug
docs:     文檔更新
style:    程式碼風格(不影響功能)
refactor: 重構(不新增功能或修復 bug)
perf:     效能優化
test:     測試相關
build:    建構系統或依賴變更
ci:       CI/CD 相關
chore:    其他雜項
revert:   還原 commit

Commit 範例

# ✅ Good commits
feat(auth): add OAuth2 login support

Implement Google and GitHub OAuth2 providers
- Add OAuth configuration
- Create callback handlers
- Update user model for social login

Closes #123

fix(api): prevent SQL injection in user search

Sanitize user input before database query
Security issue reported by pentesting team

# ❌ Bad commits
"fix bug"
"update"
"WIP"
"asdfasdf"

Commit 規則

  • 原子性: 一個 commit 只做一件事
  • 完整性: 每個 commit 都要能建構
  • 描述性: 說明 what 和 why,不只是 how
  • 可追溯: 連結相關 issue/ticket

🔄 Pull Request 流程

PR 標題格式

[Type] Brief description (#ticket-number)

Examples:
[Feature] Add user authentication system (#123)
[Bugfix] Fix memory leak in data processing (#456)
[Hotfix] Resolve critical payment failure (#789)

PR 描述模板

## 📋 Description
Brief description of changes

## 🎯 Type of Change
- [ ] 🐛 Bug fix (non-breaking change)
- [ ] ✨ New feature (non-breaking change)
- [ ] 💥 Breaking change
- [ ] 📝 Documentation update
- [ ] ♻️ Refactoring
- [ ] ⚡ Performance improvement

## 🧪 Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed

## 📸 Screenshots (if applicable)
Before | After
--- | ---
[image] | [image]

## ✅ Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex code
- [ ] Documentation updated
- [ ] No new warnings
- [ ] Tests added/updated
- [ ] All tests passing

## 🔗 Related Issues
Closes #(issue)

Read the full file on GitHub · 369 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 369 lines · 17 tokens per session scan A ba5c50d7c1c8

Subscribe to this mod's changes

git-workflow is a cursor rule published in the GitHub repository Zenobia0000/cursor-agentic-coding-template (5 stars, last pushed 4mo ago), licensed MIT. It adds 17 tokens to every session and 2,407 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to git-workflow, differing in 0 lines, and is treated as a copy.