git

Rules for using Git, a system for tracking code changes, in a software repository. They define branch names, commit-message formats, synchronization steps, and handling of breaking changes.

In plain words
What is it for?
Use them when creating feature, bug-fix, documentation, refactoring, performance, test, or maintenance branches and commits, including changes that require version updates.
Why use it?
They keep changes organized and make commit history understandable to other developers and release tools. They also set expectations for updating work from the main branch before starting.

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/pranav-karra-3301/tuck/git
Clone the repo
git clone --depth 1 https://github.com/Pranav-Karra-3301/tuck

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 428 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00428
Opus 5 $0.00000 $0.00214
Sonnet 5 $0.00000 $0.00086
Haiku 4.5 $0.00000 $0.00043

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

Security

Grade A, and why

git 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 2d 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.

.cursor/rules/git.mdc · 91 lines

What it actually says

Git Rules

Branch Strategy

  • main - Production-ready, protected
  • feat/* - New features
  • fix/* - Bug fixes
  • docs/* - Documentation
  • refactor/* - Code restructuring

Before Starting Work

ALWAYS sync with main:

git checkout main
git fetch origin
git pull origin main
git checkout -b feat/your-feature

Commit Messages

Follow Conventional Commits:

<type>(<scope>): <description>

[optional body]

[optional footer]

Types

Type Description Version Bump
feat New feature Minor (0.x.0)
fix Bug fix Patch (0.0.x)
docs Documentation None
style Formatting None
refactor Restructuring None
perf Performance Patch
test Tests None
chore Maintenance None

Examples

feat: add restore command for backup recovery
fix: handle missing config file gracefully
docs: update installation instructions
refactor: extract git operations to lib/git.ts
test: add integration tests for sync command
chore: update dependencies

Breaking Changes

feat!: redesign configuration format

BREAKING CHANGE: Config files must be migrated

Before Committing

Run all checks:

pnpm lint && pnpm typecheck && pnpm test

Pull Requests

  1. Create against main
  2. Wait for CI to pass
  3. Request review
  4. Address feedback
  5. Merge when approved

NEVER Do

  • Force push to main
  • Skip CI checks
  • Merge without review
  • Commit directly to main
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. 2d ago First seen · 91 lines · 0 tokens per session scan A edc011007c6e

Subscribe to this mod's changes

git is a cursor rule published in the GitHub repository Pranav-Karra-3301/tuck (14 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 428 tokens. 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-08-30.