📘

Git Workflow

Commits and branches that tell a reviewable story.

v1 engineering-team curated
🤖

Install 安装

curl -sSL https://updating.cc/skills/engineering-team/git-workflow/SKILL.md -o ~/.agents/skills/engineering-team__git-workflow/SKILL.md

SKILL.md Preview 技能内容预览

---
name: Git Workflow
description: Commits and branches that tell a reviewable story.
---
# Git Workflow

Write history a reviewer can read like a narrative. A 600-line commit titled "stuff" is unreviewable; the same change as five focused commits is trivial.

## Commits
- One logical change per commit. If you can't write a single subject line, split it.
- Subject ≤ 72 chars, imperative mood: "Add rate limiter to login", not "added" or "adds".
- Body explains *why*, not *what* (the diff already shows what). Reference the ticket.
- If a commit needs "and also", it should be two commits.

## Branches
- Branch from the latest main, not a stale checkout. Rebase before merging to keep history linear and avoid merge commits that obscure authorship.
- Small, short-lived branches. A branch open two weeks will conflict badly and review poorly.
- Squash trivial commits ("fix typo", "fix lint") before merge; keep meaningful ones.

## Before pushing
`git log -p` your own branch and read it as if you were the reviewer. You will catch half the problems yourself.