20 lines
1.2 KiB
Markdown
20 lines
1.2 KiB
Markdown
---
|
||
title: Git 提交规范:默认只提交不推送、中文提交信息
|
||
type: rule
|
||
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/git-提交规范默认只提交不推送、中文提交信息
|
||
stable_id: aa56cfd5-4cbf-4bbd-b589-03aaed17acb2
|
||
scope: project
|
||
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
|
||
memory_type: rule
|
||
status: active
|
||
revision: 1
|
||
restored_from_commit: 6a6a895eafcca6052e81a14fca103a42635dd1c2
|
||
created_at: '2026-09-23T15:09:04.959039+00:00'
|
||
updated_at: '2026-09-23T15:09:04.959097+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) 用户偏好:提交时把当前修改区实际改动一并提交,不按“是否本轮修改”拆分;不做空提交、不提交敏感文件。 |