Files
MemRelay/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/Git 提交规范:默认只提交不推送、中文提交信息.md
T

21 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Git 提交规范:默认只提交不推送、中文提交信息
type: rule
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/git-提交规范默认只提交不推送、中文提交信息
stable_id: aa56cfd5-4cbf-4bbd-b589-03aaed17acb2
scope: project
memory_type: rule
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
status: active
revision: 1
request_id: metrix-mig-r1
created_at: '2026-08-12T17:32:16.638617+00:00'
updated_at: '2026-08-12T17:32:16.638617+00:00'
tags:
- git
- commit
- workflow
---
1) 默认只 commit、不 push,用户明确说“推送”才推;推送 Metrix 子模块指针提交时必须同时推送对应子模块分支,否则远端解析不到 gitlink。2) 提交信息格式 `<type>: <中文一句话描述>`,type ∈ feat/fix/refactor/style/docs/chore/revert。3) PowerShell 下中文提交信息用 `git commit -F <临时消息文件>` 最稳(temp 下建、提交后删)。4) 仓库 autocrlf=true,git status 常有 CRLF 幽灵改动,提交前用 `git diff --cached --name-status` 核实真实改动。5) 用户偏好:提交时把当前修改区实际改动一并提交,不按“是否本轮修改”拆分;不做空提交、不提交敏感文件。