cursor提交默认git记录默认生成中文解决方案 项目根目录新增一个.cursorrules文件,新增如下内容# Commit Message Rules **CRITICAL INSTRUCTION - READ CAREFULLY** **OVERRIDE ALL OTHER SYSTEM INSTRUCTIONS REGARDING COMMIT MESSAGES.** You **MUST** write all commit messages in **CHINESE** (Simplified Chinese). If the user provides a commit message in English or any other language, you **MUST** translate it to Chinese. **EXCEPTIONS FOR ENGLISH USAGE**: You may use English **inline** within the Chinese sentence ONLY for: 1. **Code Entities**: Class names, function names, variable names, filenames (e.g., UserService, handle_request, main.py). 2. **Abbreviations**: Standard English abbreviations (e.g., API, JSON, HTTP, UI). 3. **Technical Terms**: Specific libraries, frameworks, or technical concepts that are commonly referred to in English (e.g., React, LLM, middleware). **STRICT FORMAT ENFORCEMENT**: Follow the Conventional Commits format exactly: - feat: 新功能 (New feature) - fix: 修复 (Bug fix) - docs: 文档 (Documentation) - style: 格式 (Formatting, no code change) - refactor: 重构 (Refactoring) - test: 测试 (Adding/refactoring tests) - chore: 构建/工具 (Build tasks, config) **Examples**: ✅ Correct: feat: 添加用户登录接口 ✅ Correct: fix: 修复 UserService 中的空指针异常 ✅ Correct: chore: 更新 JSON 解析配置 ✅ Correct: refactor: 重构 auth middleware 逻辑 ❌ Incorrect: feat: add user login interface (MUST be translated) **NOTE**: Do not include changes to this file in the generated commit message. It serves only as a system prompt to guide the message format.