Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit00118ac

Browse files
committed
docs(cursor[rules]): Add git commit message standards
why: Establish clear conventions for commit messages and AI assistancewhat:- Created git-commits.mdc with commit format guidelines- Added commit type definitions and examples- Included instructions for using Cursor's AI commit features- Documented best practices for commit message structureSee also:https://docs.cursor.com/context/rules-for-ai
1 parent9a8641c commit00118ac

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

‎.cursor/rules/git-commits.mdc‎

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
description: git-commits: Git commit message standards and AI assistance
3+
globs: git-commits: Git commit message standards and AI assistance | *.git/* .gitignore .github/* CHANGELOG.md CHANGES.md
4+
---
5+
# Git Commit Standards
6+
7+
## Format
8+
```
9+
type(scope[component]): concise description
10+
11+
why: explanation of necessity/impact
12+
what:
13+
- technical changes made
14+
- keep focused on single topic
15+
16+
refs: #issue-number, breaking changes, links
17+
```
18+
19+
## Commit Types
20+
- `feat`: New features/enhancements
21+
- `fix`: Bug fixes
22+
- `refactor`: Code restructuring
23+
- `docs`: Documentation changes
24+
- `chore`: Maintenance tasks (deps, tooling)
25+
- `test`: Test-related changes
26+
- `style`: Code style/formatting
27+
28+
## Guidelines
29+
- Subject line: max 50 chars
30+
- Body lines: max 72 chars
31+
- Use imperative mood ("Add" not "Added")
32+
- Single topic per commit
33+
- Blank line between subject and body
34+
- Mark breaking changes with "BREAKING:"
35+
- Use "See also:" for external links
36+
37+
## AI Assistance in Cursor
38+
- Stage changes with `git add`
39+
- Use `@commit` to generate initial message
40+
- Review and adjust the generated message
41+
- Ensure it follows format above
42+
43+
## Examples
44+
45+
Good commit:
46+
```
47+
feat(subprocess[run]): Switch to unicode-only text handling
48+
49+
why: Improve consistency and type safety in subprocess handling
50+
what:
51+
- BREAKING: Changed run() to use text=True by default
52+
- Removed console_to_str() helper and encoding logic
53+
- Simplified output handling
54+
- Updated type hints for better safety
55+
56+
refs: #485
57+
See also: https://docs.python.org/3/library/subprocess.html
58+
```
59+
60+
Bad commit:
61+
```
62+
updated some stuff and fixed bugs
63+
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp