Instruction file imported from Pranav-Karra-3301/tuck (
.cursor/rules/git.mdc). Copyright stays with the author.
Git Rules
Branch Strategy
main- Production-ready, protectedfeat/*- New featuresfix/*- Bug fixesdocs/*- Documentationrefactor/*- 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
- Create against
main - Wait for CI to pass
- Request review
- Address feedback
- Merge when approved
NEVER Do
- Force push to main
- Skip CI checks
- Merge without review
- Commit directly to main