git-workflow-and-versioninglisted
Install: claude install-skill LLl0k0laD/agent-skills
# Git Workflow and Versioning
## Overview
Git is your safety net. Treat commits as save points, branches as sandboxes, and history as documentation. With AI agents generating code at high speed, disciplined version control is the mechanism that keeps changes manageable, reviewable, and reversible.
## When to Use
Always. Every code change flows through git.
## Core Principles
### 1. Commit Early, Commit Often
Each successful increment gets its own commit. Don't accumulate large uncommitted changes.
```
Work pattern:
Implement slice → Test → Verify → Commit → Next slice
Not this:
Implement everything → Hope it works → Giant commit
```
Commits are save points. If the next change breaks something, you can revert to the last known-good state instantly.
### 2. Atomic Commits
Each commit does one logical thing:
```
# Good: Each commit is self-contained
git log --oneline
a1b2c3d Add task creation endpoint with validation
d4e5f6g Add task creation form component
h7i8j9k Connect form to API and add loading state
m1n2o3p Add task creation tests (unit + integration)
# Bad: Everything mixed together
git log --oneline
x1y2z3a Add task feature, fix sidebar, update deps, refactor utils
```
### 3. Descriptive Messages
Commit messages explain the *why*, not just the *what*:
```
# Good: Explains intent
feat: add email validation to registration endpoint
Prevents invalid email formats from reaching the database.
Uses Zod schema validation at the route handler level,
consist