git-workflow

git-workflow is a cursor rule for Cursor from nedcodes-ok/cursorrules-collection. It costs 891 tokens per session, scanned A, original, MIT.

A set of rules for organizing Git commits, branches, pull requests, and repository history. Git is the version-control system used to record and collaborate on code changes.

In plain words
What is it for?
Use it to write consistent commit messages, create short-lived branches, stage selected changes, and prepare cleaner pull requests and releases.
Why use it?
It keeps changes understandable, prevents unrelated work or secrets from entering commits, and makes collaboration easier.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to write consistent commit messages, create short-lived branches, stage selected changes, and prepare cleaner pull requests and releases.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/nedcodes-ok/cursorrules-collection/git-workflow
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.

Clone the repo
git clone --depth 1 https://github.com/nedcodes-ok/cursorrules-collection

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-workflow

README.md
[![agentmods](https://agentmods.dev/badge/rules/nedcodes-ok/cursorrules-collection/git-workflow/github.svg)](https://agentmods.dev/rules/nedcodes-ok/cursorrules-collection/git-workflow)
Your own site
<a href="https://agentmods.dev/rules/nedcodes-ok/cursorrules-collection/git-workflow"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursorrules-collection/git-workflow/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-workflow

Your own site · 80×15
<a href="https://agentmods.dev/rules/nedcodes-ok/cursorrules-collection/git-workflow"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursorrules-collection/git-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 891 This file is loaded in full into every session.
When invoked 891 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.1 $0.00891 $0.00891
Opus 5.5 $0.00356 $0.00356
Sonnet 5.5 $0.00178 $0.00178
Haiku 4.5 $0.00089 $0.00089

Measured 1mo ago against content hash 577548f3fe98, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

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

Copies of this mod

1 near-identical copy found in the catalogue:

rules-mdc/practices/git-workflow.mdc · 38 lines

How it starts

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

Git Workflow Rules

Commits

  • Imperative mood, under 72 chars: "Add user authentication" not "Added user authentication" or "Adding user authentication." The commit message completes the sentence: "If applied, this commit will add user authentication"
  • Conventional commit format: type(scope): description — feat(auth): add OAuth2 login, fix(api): handle null response from payment provider. Types: feat, fix, refactor, docs, test, chore, perf, ci
  • One logical change per commit. A commit that adds a feature, fixes a typo, and reformats a file is three commits. If you can't describe the change without "and," split it
  • Never commit: secrets/credentials (use .gitignore + pre-commit hooks to block), .env files (commit .env.example), build artifacts (dist/, node_modules/), large binary files (use Git LFS)
  • git add -p (patch mode) to stage specific hunks — don't blindly git add . when you have unrelated changes in the working tree

Branches

  • Branch from main (or develop if using Gitflow). Name format: type/short-description — feature/add-auth, fix/login-crash, chore/upgrade-deps
  • Short-lived branches: merge within days, not weeks. Long-lived feature branches diverge from main, accumulate merge conflicts, and get harder to review with every day
  • Delete branches after merging — stale branches clutter the repo and confuse people about what's active. Enable auto-delete in your Git host
  • One developer per branch. If two people work on one branch, you get conflicts on every pull. Use stacked PRs or split the work into separate branches that depend on each other

Pull Requests

  • PR title is the commit message that will appear in main's history (if squash-merging) — make it meaningful, not "Update stuff"
  • Description template: What changed, Why (link to issue/ticket), How to test, Screenshots (if UI), Risks/concerns. A PR without context gets either rubber-stamped or ignored
  • Under 400 lines of meaningful diff. At 400+ lines, reviewers skim instead of reviewing — you get worse feedback on more code. Split large features into stacked PRs: infrastructure → API → UI
  • Draft PRs for early feedback on approach before writing all the code — cheaper to course-correct at 30% than at 100%

Read the full file on GitHub · 38 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. 1mo ago First seen · 38 lines · 891 tokens per session scan A 577548f3fe98

Subscribe to this mod's changes

git-workflow is a cursor rule published in the GitHub repository nedcodes-ok/cursorrules-collection (38 stars, last pushed 7mo ago), licensed MIT. It adds 891 tokens to every session, about $0.0036 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other cursor rules, from other repositories

release-commit-analysis-auto

This rule analyzes commits to determine if they should trigger a version bump. It categorizes conventional and non-conventional commits into Features, Bug Fixes, Breaking Changes, Documentation, and Other. It uses intelligent keyword matching for non-conventional commits and analyzes file changes to help categorize…

usrrname/cursorrules · 0 tokens

git-master

Git operations — clean commits, PR prep, conflict resolution, change summaries.

Jkudjo/oh-my-cursor · 14 tokens

pr-template-cursorrules-prompt-file

Cursor rules for PR development with template integration.

PatrickJS/awesome-cursorrules · 1,070 tokens

changelog-generator-manual

This rule generates a comprehensive changelog.md file by analyzing all git tags and commits, creating a chronological record of all project changes with proper semantic versioning structure. The changelog.md file is stored at the root of the project.

usrrname/cursorrules · 0 tokens

release-git-tags-auto

This rule checks for existing tags before creating new ones. It also offers to push the tag to the remote repository. It runs when users request release creation, version bumping, or package publishing.

usrrname/cursorrules · 0 tokens

release-validation-auto

This rule validates release prerequisites including branch naming conventions and package.json structure. It runs when users request release creation, version bumping, or package publishing. The rule ensures releases only occur from appropriate branches (release/, hotfix/, fix/) and validates package.json exists with…

usrrname/cursorrules · 0 tokens