
Git Workflow And Versioning
This is a comprehensive workflow discipline for keeping AI-generated code manageable through git. It pushes trunk-based development with short-lived branches (1-3 days max), atomic commits around 100 lines, and a save point pattern where every successful increment gets committed immediately. The change summary format is especially practical for AI work: explicitly documenting what you didn't touch prevents scope creep and makes reviews faster. Includes worktree patterns for running multiple agents in parallel and pre-commit hygiene checks. The core insight is that when code generation is fast, version control becomes your primary defense against chaos. Best for teams struggling with large AI-generated PRs or merge conflict hell.
- skills.sh installs
- 68.8K
- GitHub stars
- 114.6K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add addyosmani/agent-skills --skill git-workflow-and-versioning --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
Trunk-Based Development (Recommended)
Keep main always deployable. Work in short-lived feature branches that merge back within 1-3 days. Long-lived development branches are hidden costs — they diverge, create merge conflicts, and delay integration. DORA research consistently shows trunk-based development correlates with high-performing engineering teams.
main ──●──●──●──●──●──●──●──●──●── (always deployable)
╲ ╱ ╲ ╱
●──●─╱ ●──╱ ← short-lived feature branches (1-3 days)
This is the recommended default. Teams using gitflow or long-lived branches can adapt the principles (atomic commits, small changes, descriptive messages) to their branching model — the commit discipline matters more than the specific branching strategy.
Sponsors
Details
- Repository
- github.com/addyosmani/agent-skills
- Categories
- Git & Pull Requests, Documentation, AI & Agent Building, Release Management, Automation & Workflows
- First seen
- Apr 16, 2026
More from addyosmani/agent-skills
All 25- Idea Refine68.3K
- Using Agent Skills68K
- Browser Testing With Devtools67.7K
- Shipping And Launch67.4K
- Source Driven Development67.4K
- Ci Cd And Automation67.3K
- Interview Me66.4K
- Deprecation And Migration66.4K
- Doubt Driven Development65.8K
- Observability And Instrumentation63.8K
- Constraint Driven Development42.4K
- Code Review And Quality84.1K
- Security And Hardening81.4K
- Frontend Ui Engineering77.8K
- Performance Optimization75.2K
- Spec Driven Development74.7K
- Planning And Task Breakdown73.5K
- Documentation And Adrs73.5K
- Code Simplification72.6K
- Api And Interface Design72.4K
- Debugging And Error Recovery72.4K
- Test Driven Development71.3K
- Context Engineering71.1K
- Incremental Implementation71K